Commit Graph

913 Commits (d0cd8217be47307449d3a176b240cbb6e410c8b9)

Author SHA1 Message Date
Isaiah Odhner d0cd8217be Fix visibility of document canvas handles 2019-12-02 16:47:37 -05:00
Isaiah Odhner 00f522e7ae Fix selecting outside the canvas by a pixel (Select and Text tools) 2019-12-02 14:00:01 -05:00
Isaiah Odhner ea0429e3fa Simplify fix 2019-12-02 12:13:09 -05:00
Isaiah Odhner e53868e931 Fix behavior with both select tools selected
- Two selection objects were created, one to stay behind forever
- The preview-drawing code interfered, leading to a zoom in while making the selection
2019-12-02 12:13:09 -05:00
Isaiah Odhner 6e2ab89359 Fix extra undoable when cropping 2019-12-02 11:54:00 -05:00
Isaiah Odhner 37c0350678 Move instantiate to constructor
Regression: extra undoable for crop
2019-12-02 11:31:00 -05:00
Isaiah Odhner 377ddb6a2e WIP 2019-12-02 11:15:55 -05:00
Isaiah Odhner 03b971b822 // 2019-12-02 10:57:54 -05:00
Isaiah Odhner 935481019f Update readme 2019-11-10 11:38:44 -05:00
Isaiah Odhner 14ee97fb6a Gay es Paint 2019-11-10 10:36:21 -05:00
Isaiah Odhner edfefd2b3d Use smaller viewport for capturing screenshots 2019-11-10 10:36:21 -05:00
Isaiah Odhner cce6396d00 Document hacky \\\\\\\\ 2019-11-05 07:17:17 -05:00
Isaiah Odhner 599395be94 Reorder image-rendering values
It's generally better to have vendor prefixes earlier, and I specifically want pixelation.
2019-11-05 07:17:17 -05:00
Isaiah Odhner 9a143821e5 Set up cypress service
(along with CYPRESS_RECORD_KEY in Travis CI settings)
2019-11-04 23:38:25 -05:00
Isaiah Odhner fb5496d2a4 Add tolerance 2019-11-04 22:39:13 -05:00
Isaiah Odhner d3e38c2556 Prevent test failure cascade (and DRY) 2019-11-04 22:36:09 -05:00
Isaiah Odhner eedf42506c \\\\\\\\
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.
:((((
2019-11-04 22:22:50 -05:00
Isaiah Odhner 2b7864f3b4 Ugh apparently spaces are mandatory
And so I just got "No builds for this repository" on Travis CI, and had to figure it out.
2019-11-04 22:08:11 -05:00
Isaiah Odhner b6d6570228 Set up Travis CI 2019-11-04 21:49:07 -05:00
Isaiah Odhner d52d022e1a Avoid layout shift in Stretch and Skew
Specify the width/height of the icon img elements so they don't change size.
2019-11-04 20:51:39 -05:00
Isaiah Odhner 1685a060af Use cypress for visual testing
- 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.
2019-11-04 20:51:39 -05:00
Isaiah Odhner 5cb0b20854 Fix overzealous destructuring
Broken in 469f13ccc3
2019-11-03 13:18:00 -05:00
Isaiah Odhner 4fad173c2f Swap out HTTP server and parallel runner for tests
- 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.
2019-11-03 13:18:00 -05:00
Isaiah Odhner 593cddac09 Clean up
No more "var" declarations
2019-11-03 10:39:48 -05:00
Isaiah Odhner 439f8cad27 Simplify 2019-11-03 01:48:30 -04:00
Isaiah Odhner d1544d04b5 Show only supported shortcuts in menus
- 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")
2019-11-03 01:47:31 -04:00
Isaiah Odhner 024cafaad1 Use less of this
and more of this: ()=> { ... }
2019-11-03 00:27:49 -04:00
Isaiah Odhner 0d61644c17 Clean up 2019-11-01 19:59:16 -04:00
Isaiah Odhner 799a745889 DRY between Select and Text tools 2019-11-01 19:52:21 -04:00
Isaiah Odhner 0891b8748f Remove concept of instantiation from OnCanvasTextBox 2019-11-01 19:02:14 -04:00
Isaiah Odhner 13fa15e7a9 Implement perfect tool previews for Select and Text tools
- 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
2019-11-01 18:56:49 -04:00
Isaiah Odhner 59f4e9bcce Make constants for changing during dev 2019-11-01 18:39:41 -04:00
Isaiah Odhner 30b602f30f Lebab le vaporwave
lebab --replace help/ --transform let
lebab --replace help/ --transform arrow
2019-10-29 21:48:17 -04:00
Isaiah Odhner 01d120a68e Fix path 2019-10-29 21:38:32 -04:00
Isaiah Odhner 82b5425334 Don't use $.each or $().each 2019-10-29 21:38:32 -04:00
Isaiah Odhner 50730f5e64 Clean up 2019-10-29 20:48:51 -04:00
Isaiah Odhner adc524e241 Fix colors box 2019-10-29 20:41:45 -04:00
Isaiah Odhner f232298a33 Do destructure THIS event param
which is not always an event :)

i.e. this makes it *more* semantic
2019-10-29 18:47:39 -04:00
Isaiah Odhner 469f13ccc3 Use a few object param destructurings
$ 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.
2019-10-29 18:42:51 -04:00
Isaiah Odhner 72d4a1fb93 Use object shorthand
lebab --replace src/ --transform obj-shorthand
2019-10-29 18:22:32 -04:00
Isaiah Odhner 08bf5541f8 Use exponent operator
lebab --replace src/ --transform exponent
2019-10-29 18:19:38 -04:00
Isaiah Odhner 21e283317b Doot 2019-10-29 18:17:34 -04:00
Isaiah Odhner a2a6c7d9ef Use default params
lebab --replace src/ --transform default-param
2019-10-29 18:15:45 -04:00
Isaiah Odhner d404b7afd7 Fix whitespace 2019-10-29 18:11:56 -04:00
Isaiah Odhner 83dd05c1b0 Clean up canvas creation
Don't pretend the canvas making helper is a class
2019-10-29 17:49:17 -04:00
Isaiah Odhner ab83621abb Clean up cursor constructing
- 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
2019-10-29 17:48:47 -04:00
Isaiah Odhner 4d77a04c9e Clean up 2019-10-29 17:28:43 -04:00
Isaiah Odhner 6e130de69e Use template strings
lebab --replace src/ --transform template
2019-10-29 17:16:33 -04:00
Isaiah Odhner d0f4b08690 Fix lint 2019-10-29 17:08:13 -04:00
Isaiah Odhner ad24e53e65 Fix indentation 2019-10-29 17:00:31 -04:00