mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
improvement: do not reset to selection for draw tool (#2721)
Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
ade2565f49
commit
4acdc47ef0
5 changed files with 36 additions and 25 deletions
|
@ -118,11 +118,14 @@ export const actionFinalize = register({
|
|||
);
|
||||
}
|
||||
|
||||
if (!appState.elementLocked) {
|
||||
if (!appState.elementLocked && appState.elementType !== "draw") {
|
||||
appState.selectedElementIds[multiPointElement.id] = true;
|
||||
}
|
||||
}
|
||||
if (!appState.elementLocked || !multiPointElement) {
|
||||
if (
|
||||
(!appState.elementLocked && appState.elementType !== "draw") ||
|
||||
!multiPointElement
|
||||
) {
|
||||
resetCursor();
|
||||
}
|
||||
return {
|
||||
|
@ -130,7 +133,8 @@ export const actionFinalize = register({
|
|||
appState: {
|
||||
...appState,
|
||||
elementType:
|
||||
appState.elementLocked && multiPointElement
|
||||
(appState.elementLocked || appState.elementType === "draw") &&
|
||||
multiPointElement
|
||||
? appState.elementType
|
||||
: "selection",
|
||||
draggingElement: null,
|
||||
|
@ -139,7 +143,9 @@ export const actionFinalize = register({
|
|||
startBoundElement: null,
|
||||
suggestedBindings: [],
|
||||
selectedElementIds:
|
||||
multiPointElement && !appState.elementLocked
|
||||
multiPointElement &&
|
||||
!appState.elementLocked &&
|
||||
appState.elementType !== "draw"
|
||||
? {
|
||||
...appState.selectedElementIds,
|
||||
[multiPointElement.id]: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue