mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
remove closures from mutateElement, get rid of the element spreading (#902)
This commit is contained in:
parent
13b838117c
commit
83a2f5de28
10 changed files with 218 additions and 196 deletions
|
@ -19,11 +19,11 @@ export const actionFinalize = register({
|
|||
if (appState.multiElement) {
|
||||
// pen and mouse have hover
|
||||
if (appState.lastPointerDownWith !== "touch") {
|
||||
mutateElement(appState.multiElement, multiElement => {
|
||||
multiElement.points = multiElement.points.slice(
|
||||
mutateElement(appState.multiElement, {
|
||||
points: appState.multiElement.points.slice(
|
||||
0,
|
||||
multiElement.points.length - 1,
|
||||
);
|
||||
appState.multiElement.points.length - 1,
|
||||
),
|
||||
});
|
||||
}
|
||||
if (isInvisiblySmallElement(appState.multiElement)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue