Anki/ts/image-occlusion
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
..
notes-toolbar Experiment with disabling prettier whitespace sensitivity 2023-06-01 11:11:26 +10:00
shapes image occlusion button in note editor (#2485) 2023-07-27 22:45:49 +10:00
tools Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
add-or-update-note.ts Combine all backend methods into a single js/d.ts file, like in Python 2023-07-03 13:46:38 +10:00
canvas-scale.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
icons.ts follow-up pr for io button in note editor (#2600) 2023-07-31 14:24:26 +10:00
image-occlusion-base.scss Add scss formatter 2023-07-03 09:44:38 +10:00
ImageOcclusionPage.svelte follow-up pr for io button in note editor (#2600) 2023-07-31 14:24:26 +10:00
index.ts image occlusion button in note editor (#2485) 2023-07-27 22:45:49 +10:00
lib.ts Migrate to protobuf-es (#2547) 2023-06-14 22:47:37 +10:00
mask-editor.ts Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
MaskEditor.svelte Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
Notes.svelte image occlusion button in note editor (#2485) 2023-07-27 22:45:49 +10:00
review.scss Add scss formatter 2023-07-03 09:44:38 +10:00
review.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
StickyFooter.svelte follow-up pr for io button in note editor (#2600) 2023-07-31 14:24:26 +10:00
store.ts follow-up pr for io button in note editor (#2600) 2023-07-31 14:24:26 +10:00
Tags.svelte fix image height issues in iOS safari (#2480) 2023-04-26 16:01:04 +10:00
Toast.svelte Experiment with disabling prettier whitespace sensitivity 2023-06-01 11:11:26 +10:00
Toolbar.svelte Fix some issues with undo/redo in mask editor (#2649) 2023-09-10 13:26:41 +10:00
tsconfig.json Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
types.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00