1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

Remove zindex options from panel (#315)

Now that they are in the context menu, we don't need to have them in the panel anymore.

Fixes #242
This commit is contained in:
Christopher Chedeau 2020-01-11 14:58:11 -08:00 committed by GitHub
parent 8f28c59deb
commit 6399b1f318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,3 @@
import React from "react";
import { Action } from "./types"; import { Action } from "./types";
import { import {
moveOneLeft, moveOneLeft,
@ -20,12 +19,7 @@ export const actionSendBackward: Action = {
contextItemLabel: "Send Backward", contextItemLabel: "Send Backward",
keyPriority: 40, keyPriority: 40,
keyTest: event => keyTest: event =>
event[META_KEY] && event.shiftKey && event.altKey && event.code === "KeyB", event[META_KEY] && event.shiftKey && event.altKey && event.code === "KeyB"
PanelComponent: ({ updateData }) => (
<button type="button" onClick={e => updateData(null)}>
Send backward
</button>
)
}; };
export const actionBringForward: Action = { export const actionBringForward: Action = {
@ -39,12 +33,7 @@ export const actionBringForward: Action = {
contextItemLabel: "Bring Forward", contextItemLabel: "Bring Forward",
keyPriority: 40, keyPriority: 40,
keyTest: event => keyTest: event =>
event[META_KEY] && event.shiftKey && event.altKey && event.code === "KeyF", event[META_KEY] && event.shiftKey && event.altKey && event.code === "KeyF"
PanelComponent: ({ updateData }) => (
<button type="button" onClick={e => updateData(null)}>
Bring Forward
</button>
)
}; };
export const actionSendToBack: Action = { export const actionSendToBack: Action = {
@ -56,12 +45,7 @@ export const actionSendToBack: Action = {
}; };
}, },
contextItemLabel: "Send to Back", contextItemLabel: "Send to Back",
keyTest: event => event[META_KEY] && event.shiftKey && event.code === "KeyB", keyTest: event => event[META_KEY] && event.shiftKey && event.code === "KeyB"
PanelComponent: ({ updateData }) => (
<button type="button" onClick={e => updateData(null)}>
Send to Back
</button>
)
}; };
export const actionBringToFront: Action = { export const actionBringToFront: Action = {
@ -73,10 +57,5 @@ export const actionBringToFront: Action = {
}; };
}, },
contextItemLabel: "Bring to Front", contextItemLabel: "Bring to Front",
keyTest: event => event[META_KEY] && event.shiftKey && event.code === "KeyF", keyTest: event => event[META_KEY] && event.shiftKey && event.code === "KeyF"
PanelComponent: ({ updateData }) => (
<button type="button" onClick={e => updateData(null)}>
Bring to Front
</button>
)
}; };