fix history (#1009)

* fix history

* tweak withBatchedUpdates typing
This commit is contained in:
David Luzar 2020-03-19 14:51:05 +01:00 committed by GitHub
parent ca5f37850e
commit 82ce068972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 86 additions and 80 deletions

View file

@ -26,11 +26,11 @@ export const actionSendBackward = register({
getSelectedIndices(elements, appState),
),
appState,
commitToHistory: true,
};
},
contextItemLabel: "labels.sendBackward",
keyPriority: 40,
commitToHistory: () => true,
keyTest: event =>
event[KEYS.CTRL_OR_CMD] && !event.shiftKey && event.code === "BracketLeft",
PanelComponent: ({ updateData }) => (
@ -54,11 +54,11 @@ export const actionBringForward = register({
getSelectedIndices(elements, appState),
),
appState,
commitToHistory: true,
};
},
contextItemLabel: "labels.bringForward",
keyPriority: 40,
commitToHistory: () => true,
keyTest: event =>
event[KEYS.CTRL_OR_CMD] && !event.shiftKey && event.code === "BracketRight",
PanelComponent: ({ updateData }) => (
@ -82,10 +82,10 @@ export const actionSendToBack = register({
getSelectedIndices(elements, appState),
),
appState,
commitToHistory: true,
};
},
contextItemLabel: "labels.sendToBack",
commitToHistory: () => true,
keyTest: event => {
return isDarwin
? event[KEYS.CTRL_OR_CMD] && event.altKey && event.code === "BracketLeft"
@ -118,9 +118,9 @@ export const actionBringToFront = register({
getSelectedIndices(elements, appState),
),
appState,
commitToHistory: true,
};
},
commitToHistory: () => true,
contextItemLabel: "labels.bringToFront",
keyTest: event => {
return isDarwin