mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
feat: new chord editing
feat: clear all changes with shift undo, fixes #7
This commit is contained in:
@@ -7,9 +7,13 @@
|
||||
import {deviceChords, deviceLayout, deviceSettings, serialPort, syncStatus} from "$lib/serial/connection"
|
||||
import {deserializeActions} from "$lib/serial/chord"
|
||||
|
||||
function undo() {
|
||||
redoQueue = [$changes.pop()!, ...redoQueue]
|
||||
changes.update(it => it)
|
||||
function undo(event: MouseEvent) {
|
||||
if (event.shiftKey) {
|
||||
changes.set([])
|
||||
} else {
|
||||
redoQueue = [$changes.pop()!, ...redoQueue]
|
||||
changes.update(it => it)
|
||||
}
|
||||
}
|
||||
|
||||
function redo() {
|
||||
|
||||
Reference in New Issue
Block a user