editor: add undo/redo 🎉
This commit is contained in:
parent
085f6bcd4a
commit
3d6f6dc7c5
9 changed files with 193 additions and 1 deletions
|
|
@ -52,3 +52,19 @@ When holding the `ctrl` key (or `command` on Mac), multiple widgets can be selec
|
|||
- they must share the same parent widget
|
||||
- context-menu actions and properties changes apply to all selected widgets
|
||||
- resizing / dragging will affect all selected widgets, relatively to the first selected widget
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
| Shortcut | Description |
|
||||
|---|---|
|
||||
| `mod + z` | undo |
|
||||
| `mod + y / mod + shift + z` | redo |
|
||||
| `delete` | delete selected widgets |
|
||||
| `mod + c` | copy selected widgets |
|
||||
| `mod + x` | cut selected widgets |
|
||||
| `mod + v` | paste clipboard in selected widget |
|
||||
| `mod + shift + v` | paste and increment id |
|
||||
| `up, down, left, right` | move selected widgets (1 grid unit, hold `mod` for 5 grid units) |
|
||||
| `alt + [up, down, left, right]` | resize selected widgets (1 grid unit, hold `mod` for 5 grid units) |
|
||||
|
||||
Where `mod` is `ctrl` except on MacOs (`command`)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,14 @@ Apply a set of options to an existing widget by merging them to the widget's opt
|
|||
!!! warning ""
|
||||
Editing a widget can be cpu expensive, hence updating the UI continuously is not a good idea
|
||||
|
||||
## `/EDIT/UNDO`
|
||||
|
||||
Undo editing action
|
||||
|
||||
## `/EDIT/REDO`
|
||||
|
||||
Redo editing action
|
||||
|
||||
## `/EDIT/GET target id`
|
||||
|
||||
Sends back a widget's data (JSON stringified object), including its children, to specified target.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue