chore: Refactor and remove scene from elbow arrow generation (#8342)

* Refactor and remove scene from elbow arrow generation
This commit is contained in:
Márk Tolmács
2024-08-08 14:06:26 +02:00
committed by GitHub
parent 72d6ee48fc
commit dd1370381d
18 changed files with 115 additions and 156 deletions
@@ -25,6 +25,7 @@ const deleteSelectedElements = (
appState: AppState,
app: AppClassProperties,
) => {
const elementsMap = app.scene.getNonDeletedElementsMap();
const framesToBeDeleted = new Set(
getSelectedElements(
elements.filter((el) => isFrameLikeElement(el)),
@@ -51,7 +52,7 @@ const deleteSelectedElements = (
? null
: bound.endBinding,
});
mutateElbowArrow(bound, app.scene, bound.points);
mutateElbowArrow(bound, elementsMap, bound.points);
}
});
}
@@ -159,7 +160,7 @@ export const actionDeleteSelected = register({
LinearElementEditor.deletePoints(
element,
selectedPointsIndices,
app.scene,
elementsMap,
);
return {