mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: remove duplicate key handling (#2878)
This commit is contained in:
parent
4624ec2bd6
commit
6abf4f52ff
2 changed files with 7 additions and 32 deletions
|
@ -5,6 +5,7 @@ import { actionDeleteSelected } from "./actionDeleteSelected";
|
|||
import { getSelectedElements } from "../scene/selection";
|
||||
import { exportCanvas } from "../data/index";
|
||||
import { getNonDeletedElements } from "../element";
|
||||
import { t } from "../i18n";
|
||||
|
||||
export const actionCopy = register({
|
||||
name: "copy",
|
||||
|
@ -91,6 +92,10 @@ export const actionCopyAsPng = register({
|
|||
appState,
|
||||
);
|
||||
return {
|
||||
appState: {
|
||||
...appState,
|
||||
toastMessage: t("toast.copyToClipboardAsPng"),
|
||||
},
|
||||
commitToHistory: false,
|
||||
};
|
||||
} catch (error) {
|
||||
|
@ -105,4 +110,5 @@ export const actionCopyAsPng = register({
|
|||
}
|
||||
},
|
||||
contextItemLabel: "labels.copyAsPng",
|
||||
keyTest: (event) => event.code === CODES.C && event.altKey && event.shiftKey,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue