mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-26 02:40:07 +02:00
@@ -469,6 +469,7 @@ export class LinearElementEditor {
|
||||
editingLinearElement: LinearElementEditor,
|
||||
appState: AppState,
|
||||
scene: Scene,
|
||||
shouldBind?: boolean,
|
||||
): LinearElementEditor {
|
||||
const elementsMap = scene.getNonDeletedElementsMap();
|
||||
const elements = scene.getNonDeletedElements();
|
||||
@@ -531,6 +532,19 @@ export class LinearElementEditor {
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldBind) {
|
||||
const element = scene.getElement(editingLinearElement.elementId);
|
||||
if (isBindingElement(element) && isBindingEnabled(appState)) {
|
||||
bindOrUnbindLinearElement(
|
||||
element,
|
||||
bindings.startBindingElement || "keep",
|
||||
bindings.endBindingElement || "keep",
|
||||
elementsMap,
|
||||
scene,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...editingLinearElement,
|
||||
...bindings,
|
||||
|
Reference in New Issue
Block a user