mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
3f9c6299a0
commit
a5a74be45d
6 changed files with 26 additions and 24 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue