Revert "Feature: Multi Point Arrows (#338)" (#634)

This reverts commit 16263e942b.
This commit is contained in:
David Luzar 2020-01-31 18:56:55 +01:00 committed by GitHub
parent 16263e942b
commit 3d2e59bfed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 130 additions and 789 deletions

View file

@ -1,27 +0,0 @@
import { Action } from "./types";
import { KEYS } from "../keys";
import { clearSelection } from "../scene";
export const actionFinalize: Action = {
name: "finalize",
perform: (elements, appState) => {
if (window.document.activeElement instanceof HTMLElement) {
window.document.activeElement.blur();
}
return {
elements: clearSelection(elements),
appState: {
...appState,
elementType: "selection",
draggingElement: null,
multiElement: null,
},
};
},
keyTest: (event, appState) =>
(event.key === KEYS.ESCAPE &&
!appState.draggingElement &&
appState.multiElement === null) ||
((event.key === KEYS.ESCAPE || event.key === KEYS.ENTER) &&
appState.multiElement !== null),
};