- Two selection objects were created, one to stay behind forever
- The preview-drawing code interfered, leading to a zoom in while making the selection
On Linux (Travis CI) this should evaluate as a backslash, at least. (please.)
On Windows this will evaluate as two backslashes, but that should be fine since it's in a regexp character class.
:((((
- Ditch Casper.js / PhantomCSS
- Set up Cypress and cypress-image-snapshot
- Implement visual tests covering most of the same ground as what I had before (and more), but with some caveats
- Some tests are flaky right now due to resource loading, and some have areas blotched out in order to not depend on resource loading
- TODO: set up continuous integration, add more tests, etc.
- Swap `http-server` for `serve` to fix an issue https://github.com/http-party/http-server/issues/525 (could downgrade instead alternatively)
- Swap `parallelshell` for `npm-run-all` to fix an issue https://github.com/darkguy2008/parallelshell/issues/69 (could downgrade instead alternatively)
- Switch from firefox (slimerjs) to the default (phantomjs) because my version of firefox is too new now
- This gets tests running, sorta, but not working.
- I hid "Ctrl+W" previously, but Ctrl+R is also destructive.
- And Alt+F4 closes the whole browser window, not just the (web) application.
- For File > New, Ctrl+Alt+N works as an alternative; list that.
- For Image > Clear Image, Ctrl+Shift+N works in Firefox, but opens an incognito window in chrome; add browser detection.
- Ctrl+R, Ctrl+L, Ctrl+T, Ctrl+PgDn, and Ctrl+PgUp are not actually implemented.
- Fix showing Ctrl+G (typo "shorcut")
- Instead of creating an OnCanvasTextbox or OnCanvasSelection object during selection, draw the preview in the tool
- Get it looking exactly like it does in mspaint (as far as I can tell)
- Fix how selection rect is determined
- Don't create textbox or selection if width or height would be 1
- Don't draw unless the pointer has moved
$ lebab --replace src/ --transform destruct-param
src/canvas-change.js:
23: warning 5 different props found, will not transform more than 4 (destruct-param)
Don't destructure events or elements, or (otherwise) lose important context from the variable name.
- Don't pretend like it's a class
- Split a variable definition (which would have been really bad practice if it was actually a class)
- Take args directly instead of in an array