From 94497090d3b97fd9a66cb107d7a6386a2597d66b Mon Sep 17 00:00:00 2001 From: moklick Date: Tue, 4 Aug 2020 10:45:18 +0200 Subject: [PATCH] refactor(store): get rid of unused selection --- src/store/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/store/index.ts b/src/store/index.ts index 638f89b0..208df4ee 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -67,7 +67,6 @@ export interface StoreModel { nodesSelectionActive: boolean; selectionActive: boolean; - selection: SelectionRect | null; userSelectionRect: SelectionRect; @@ -154,7 +153,6 @@ export const storeModel: StoreModel = { nodesSelectionActive: false, selectionActive: false, - selection: null, userSelectionRect: { startX: 0, @@ -226,7 +224,6 @@ export const storeModel: StoreModel = { if (state.snapToGrid) { const [gridSizeX, gridSizeY] = state.snapGrid; - position = { x: gridSizeX * Math.round(pos.x / gridSizeX), y: gridSizeY * Math.round(pos.y / gridSizeY), @@ -276,7 +273,6 @@ export const storeModel: StoreModel = { const nextSelectedElements = [...selectedNodes, ...selectedEdges]; const selectedElementsUpdated = !isEqual(nextSelectedElements, state.selectedElements); - state.selection = nextRect; state.userSelectionRect = nextRect; if (selectedElementsUpdated) { @@ -298,7 +294,6 @@ export const storeModel: StoreModel = { const selectedNodesBbox = getRectOfNodes(selectedNodes); - state.selection = state.userSelectionRect; state.nodesSelectionActive = true; state.selectedNodesBbox = selectedNodesBbox;