mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Resize handler detection should not be active when moving multip… (#767)
* Fix bug. * Implement `getSelectedElements`. * Explicit condition. * Respect variable naming. * Keep state consistent. * Use `isSomeElementSelected` abstraction. * Missing ones.
This commit is contained in:
parent
ad72946131
commit
6ebd41734f
9 changed files with 53 additions and 37 deletions
|
@ -1,4 +1,5 @@
|
|||
import { ExcalidrawElement } from "./element/types";
|
||||
import { getSelectedElements } from "./scene";
|
||||
|
||||
let CLIPBOARD = "";
|
||||
let PREFER_APP_CLIPBOARD = false;
|
||||
|
@ -19,9 +20,7 @@ export async function copyToAppClipboard(
|
|||
elements: readonly ExcalidrawElement[],
|
||||
) {
|
||||
CLIPBOARD = JSON.stringify(
|
||||
elements
|
||||
.filter(element => element.isSelected)
|
||||
.map(({ shape, ...el }) => el),
|
||||
getSelectedElements(elements).map(({ shape, ...el }) => el),
|
||||
);
|
||||
try {
|
||||
// when copying to in-app clipboard, clear system clipboard so that if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue