mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Correctly update pointerDownState
Fixed an issue where the `pointerDownState` was not being updated appropriately.
This commit is contained in:
parent
819403be3c
commit
1d2eff292b
1 changed files with 9 additions and 9 deletions
|
@ -8203,10 +8203,11 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
...pointerDownState,
|
...pointerDownState,
|
||||||
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
||||||
};
|
};
|
||||||
if (this.maybeHandleCrop(updatedPointerDownState, event)) {
|
pointerDownState = updatedPointerDownState;
|
||||||
|
if (this.maybeHandleCrop(pointerDownState, event)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (this.maybeHandleResize(updatedPointerDownState, event)) {
|
if (this.maybeHandleResize(pointerDownState, event)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8610,6 +8611,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
...pointerDownState,
|
...pointerDownState,
|
||||||
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
||||||
};
|
};
|
||||||
|
pointerDownState = updatedPointerDownState;
|
||||||
if (event.altKey) {
|
if (event.altKey) {
|
||||||
this.setActiveTool(
|
this.setActiveTool(
|
||||||
{ type: "lasso", fromSelection: true },
|
{ type: "lasso", fromSelection: true },
|
||||||
|
@ -8626,7 +8628,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
selectionElement: null,
|
selectionElement: null,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.maybeDragNewGenericElement(updatedPointerDownState, event);
|
this.maybeDragNewGenericElement(pointerDownState, event);
|
||||||
}
|
}
|
||||||
} else if (this.state.activeTool.type === "lasso") {
|
} else if (this.state.activeTool.type === "lasso") {
|
||||||
if (!event.altKey && this.state.activeTool.fromSelection) {
|
if (!event.altKey && this.state.activeTool.fromSelection) {
|
||||||
|
@ -8637,7 +8639,8 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
...pointerDownState,
|
...pointerDownState,
|
||||||
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
||||||
};
|
};
|
||||||
this.maybeDragNewGenericElement(updatedPointerDownState, event);
|
pointerDownState = updatedPointerDownState;
|
||||||
|
this.maybeDragNewGenericElement(pointerDownState, event);
|
||||||
this.lassoTrail.endPath();
|
this.lassoTrail.endPath();
|
||||||
} else {
|
} else {
|
||||||
this.lassoTrail.addPointToPath(
|
this.lassoTrail.addPointToPath(
|
||||||
|
@ -8736,11 +8739,8 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
...pointerDownState,
|
...pointerDownState,
|
||||||
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
lastCoords: pointFrom(pointerCoordsX, pointerCoordsY),
|
||||||
};
|
};
|
||||||
this.maybeDragNewGenericElement(
|
pointerDownState = updatedPointerDownState;
|
||||||
updatedPointerDownState,
|
this.maybeDragNewGenericElement(pointerDownState, event, false);
|
||||||
event,
|
|
||||||
false,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue