Isaiah Odhner
8053b38e58
Auto-format code with VS Code
...
Format JS and HTML using VS Code extension: https://marketplace.visualstudio.com/items?itemName=jbockle.jbockle-format-files
Dedented some files for now to make the diff intelligible:
- tools.js
- menus.js
- speech-recognition.js
- simulate-random-gestures.js
2022-01-18 19:40:58 -05:00
Isaiah Odhner
0eb91265ef
Hide object outlines in Thumbnail immediately when starting dragging
2021-12-04 18:35:08 -05:00
Isaiah Odhner
dba7b93236
Refactor $Handles -> Handles
2021-12-04 16:11:48 -05:00
Isaiah Odhner
f24e72168e
Show static selection box outline in Thumbnail
2021-12-03 20:18:05 -05:00
Isaiah Odhner
f2c136190e
Ditch PEP.js
2021-07-30 03:36:57 -04:00
Isaiah Odhner
977c8c3b65
Spellcheck
2021-06-19 20:40:30 -04:00
Isaiah Odhner
59415978c7
Add thresholds everywhere canvas ImageData is compared
...
- Fixes brushes sometimes including extra random pixels they're not supposed to, for example a two-pixel pencil.
- Fixes document sometimes being considered transparent
- Fixes brush/pencil/airbrush sometimes showing rainbowy (my hack representation of translucency) even though the color is solid
2021-03-26 00:54:49 -04:00
Isaiah Odhner
cec0c49c6d
Use non-native BMP decoding for pixel data too, not just palette
2021-02-13 13:37:47 -05:00
Isaiah Odhner
60e6dfc69f
Rename selected colors global
2021-02-12 10:13:53 -05:00
Isaiah Odhner
e4d2a24eb6
Rename main canvas globals
...
"canvas"/"ctx" are WAY too typo-prone, way too prone to accidental use.
2021-02-10 22:27:35 -05:00
Isaiah Odhner
9f9b874caf
Fix main canvas handles offset
2021-02-10 14:02:36 -05:00
Isaiah Odhner
6d6ed91cea
Fix selection+textbox ghost offset
...
(broken in last commit, but not this good previously)
2021-02-08 23:33:24 -05:00
Isaiah Odhner
216e0e270f
Fix selection+textbox ghost inverty effect
2021-02-08 20:12:24 -05:00
Isaiah Odhner
2e6732ec01
Refactor
2021-02-08 19:07:26 -05:00
Isaiah Odhner
ef50db81a5
Refactor rectangle handling for handles
...
Say that ten times fast.
Rectangles are now in the same coordinate spaces, and same representations (x, y, width, height).
2021-02-08 17:55:17 -05:00
Isaiah Odhner
4dfb04d6f4
Separate tool name and ID concepts
...
Localization shouldn't be involved in logic checking for specific tools.
This pattern is just ridiculous looking:
select_tool(get_tool_by_name(localize("Select")));
2020-12-11 12:20:40 -05:00
Isaiah Odhner
dbcd4cba1f
WIP localization
2020-12-07 00:35:13 -05:00
Isaiah Odhner
31edf30064
Unify TODO comments
2020-04-27 20:45:47 -04:00
Isaiah Odhner
ecb7459ff0
Revert "Add setPointerCapture for iframe usage (98.js.org)"
...
This reverts commit bc2d30d45b
.
Disabling event.preventDefault() in order to do setPointerCapture caused a context menu to be shown on right click of the canvas, the context menu being default browser behavior.
Fixes #155
2020-01-03 09:00:42 -05:00
Isaiah Odhner
bc2d30d45b
Add setPointerCapture for iframe usage (98.js.org)
2020-01-01 19:42:40 -05:00
Isaiah Odhner
9092d86ee2
Fix: don't merge and rename Stamp into Move
2019-12-21 00:38:15 -05:00
Isaiah Odhner
c6f3d7b017
Update undoable name when a Stamp becomes a Smear
2019-12-21 00:37:58 -05:00
Isaiah Odhner
4e44084ef2
Fix "Unknown [undoable]" when loading canvas size
2019-12-21 00:37:58 -05:00
Isaiah Odhner
ca4270789b
De-hack melding text and selections
2019-12-21 00:37:56 -05:00
Isaiah Odhner
26dff1259c
Move undoable creation to each selection creation site
...
- Fix "Unknown [undoable]" undoable created with Free-Form Select once you do something else (e.g. move it)
- Simplify things, and remove a HACK
2019-12-21 00:37:55 -05:00
Isaiah Odhner
27331162de
Skip soft undoables
...
- Fixes undoing past Text tool, where otherwise it would trap Ctrl+Z for the textbox
- To access these undoables, you have to use the Document History window
2019-12-21 00:37:53 -05:00
Isaiah Odhner
6c20663afd
Improve Stamp/Smear in history
2019-12-21 00:37:51 -05:00
Isaiah Odhner
1d9f56d0d4
Restructure arguments to undoable()
2019-12-21 00:37:50 -05:00
Isaiah Odhner
f576d8b756
Include textboxes in history (Go back and edit!)
2019-12-21 00:37:47 -05:00
Isaiah Odhner
bc3a450c47
Include selection and selection operations in history
2019-12-21 00:37:46 -05:00
Isaiah Odhner
a770627445
WIP towards soft undos (this doesn't work)
2019-12-21 00:37:42 -05:00
Isaiah Odhner
94d9c82e09
Explicitly modify undoable when finalizing selection
...
- Conditionally create an undoable for Deselect in case there's a Session Sync update in between selecting and deselecting (in Multi-User mode), and otherwise modify the undoable for Select/Free-Form Select
- Multi-User: Don't sync to the database CONSTANTLY while smearing a selection! (I should still add debouncing!)
2019-12-21 00:37:35 -05:00
Isaiah Odhner
4c7ebf4fee
Fix: update helper layer when changing transparency option
2019-12-08 23:29:58 -05:00
Isaiah Odhner
e29e1fba39
Fix autosave on Ctrl+A
...
..which isn't great, because the selection isn't saved with the session.
2019-12-08 23:28:00 -05:00
Isaiah Odhner
2421b7669e
Mash up icons for MultiTools
2019-12-08 20:04:03 -05:00
Isaiah Odhner
cbfcb47681
Prevent "Smear, Smear" and "Smear, Stamp"
2019-12-08 19:26:55 -05:00
Isaiah Odhner
e041e7afa9
Show tool icons in history view
...
Show more tool icons and better
2019-12-08 19:16:43 -05:00
Isaiah Odhner
987d6e8d4c
More detail!
2019-12-08 13:07:27 -05:00
Isaiah Odhner
85e8922c08
Name undoables with details
2019-12-08 13:07:27 -05:00
Isaiah Odhner
a862d5b7b8
Name undoables
2019-12-08 11:52:12 -05:00
Isaiah Odhner
f4fb65ee88
Remove redo data deletion dialog
2019-12-08 10:52:06 -05:00
Isaiah Odhner
0e3e90e170
Simplify
...
- Break out contents of poorly named function (punction?) "this_ones_a_frame_changer"
- Remove need for setTimeout
2019-12-08 10:45:08 -05:00
Isaiah Odhner
374d5c3ce1
Fix: update helper layer when deleting selection (or textbox)
2019-12-05 23:24:11 -05:00
Isaiah Odhner
64c435018d
Draw selection and textbox contents under the grid
...
This also makes the contents visible only within the canvas bounds, which matches mspaint.
2019-12-05 16:26:49 -05:00
Isaiah Odhner
7ce4e94293
Fix resizing selections and textboxes when zoomed in!!!
2019-12-04 17:31:29 -05:00
Isaiah Odhner
3392557fb4
Refactor
...
Share less implementation details between these modules
2019-12-04 17:31:28 -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
593cddac09
Clean up
...
No more "var" declarations
2019-11-03 10:39:48 -05:00