anki/ts/image-occlusion/tools
Hikaru Y 3742fa9f0c
Fix some issues with undo/redo in mask editor (#2649)
Issues:
- The `change` event was not dispatched in MaskEditor.svelte when an
undo/redo was performed. Therefore, if the user then closed the editor
or switched to another note without performing an operation that would
cause the `change` event to be dispatched, the undone or redone changes
were not saved to DB.
- When `IOMode.kind === "edit"` (i.e., Edit Current or Browse), the
beginning of the undo history was a blank canvas, not a canvas with
existing masks. Therefore, if you continued to undo to the beginning of
the history, the masks that existed when you opened the editor would be
lost, and they would not be restored even when you performed a redo.
- In the 'Add' dialog, the undo history was not reset when starting to
create a new IO note after adding an IO note.

Also add a small UI improvement:
The undo/redo buttons are now disabled when there is no action to
undo/redo.
2023-09-10 13:26:41 +10:00
..
add-from-cloze.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
index.ts Feature image occlusion (#2367) 2023-03-29 12:33:19 +10:00
lib.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
more-tools.ts Feature image occlusion (#2367) 2023-03-29 12:33:19 +10:00
tool-aligns.ts Feature image occlusion (#2367) 2023-03-29 12:33:19 +10:00
tool-buttons.ts Feature image occlusion (#2367) 2023-03-29 12:33:19 +10:00
tool-ellipse.ts Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
tool-polygon.ts Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
tool-rect.ts Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
tool-undo-redo.ts Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00