Undo, and the toolbar in three groups
Undo takes back one's own latest mark, by the button, Ctrl+Z or two quick taps of the eraser; the toolbar's drawing tools, the page and view, and the session stand in three groups that do not move when the tool changes; the buttons are a little smaller.
This commit is contained in:
1 parent
a139361e8d
commit
4e3a281d65
11 files changed
+602
-35
No files matched your search
@@ -30,6 +30,8 @@ export class TextEditor {
|
||||
* @param {object} target
|
||||
* @param {(block: TextBlock) => void} target.setText The block changed.
|
||||
* @param {(id: string) => void} target.removeText The block was left empty.
|
||||
* @param {(id: string) => void} [target.beginEdit] Editing of the block begins: one gesture until endEdit.
|
||||
* @param {(id: string) => void} [target.endEdit] The editing ended.
|
||||
* @param {(clientX: number, clientY: number) => boolean} [target.beginHold]
|
||||
* The pen rested on the field for HOLD_MS: a hold, as on the page
|
||||
* (Andy, 2026-10-09: the box being typed in can be moved without
|
||||
@@ -185,6 +187,7 @@ export class TextEditor {
|
||||
*/
|
||||
edit(block) {
|
||||
this.stop();
|
||||
this.target.beginEdit?.(block.id);
|
||||
this.block = block;
|
||||
this.renderer.editingText = block.id;
|
||||
this.field.value = block.text;
|
||||
@@ -207,6 +210,7 @@ export class TextEditor {
|
||||
this.field.value = '';
|
||||
if (block.text.trim() === '') this.target.removeText(block.id);
|
||||
else this.target.setText(block);
|
||||
this.target.endEdit?.(block.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user