Improve pasting (#723)

* switch to selection tool on paste

* align pasting via contextMenu with pasting from event

* ensure only plaintext can be pasted

* fix findShapeByKey regression

* simplify wysiwyg pasting

* improve wysiwyg blurriness
This commit is contained in:
David Luzar 2020-02-07 18:42:24 +01:00 committed by GitHub
parent ba1a39c9f3
commit 88eacc9da7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 119 additions and 82 deletions

View file

@ -1,4 +1,5 @@
import { ExcalidrawElement } from "./element/types";
import { SHAPES } from "./shapes";
export type AppState = {
draggingElement: ExcalidrawElement | null;
@ -8,7 +9,7 @@ export type AppState = {
// element being edited, but not necessarily added to elements array yet
// (e.g. text element when typing into the input)
editingElement: ExcalidrawElement | null;
elementType: string;
elementType: typeof SHAPES[number]["value"];
elementLocked: boolean;
exportBackground: boolean;
currentItemStrokeColor: string;