mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Center element on paste (#248)
* Center element on paste * paste on cursor position * correctly center elements * rename vars
This commit is contained in:
parent
a73e4e28aa
commit
1ea72e9134
4 changed files with 75 additions and 29 deletions
|
@ -22,9 +22,7 @@ export const hasStroke = (elements: ExcalidrawElement[]) =>
|
|||
);
|
||||
|
||||
export const hasText = (elements: ExcalidrawElement[]) =>
|
||||
elements.some(
|
||||
element => element.isSelected && element.type === "text"
|
||||
);
|
||||
elements.some(element => element.isSelected && element.type === "text");
|
||||
|
||||
export function getElementAtPosition(
|
||||
elements: ExcalidrawElement[],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue