fix(selection): dont render selection when another node gets selected

This commit is contained in:
moklick
2020-09-11 11:04:38 +02:00
parent 1425b8ffde
commit 4cc6b0af02
3 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -312,9 +312,9 @@ export const storeModel: StoreModel = {
}),
unsetUserSelection: action((state) => {
const selectedNodes = getNodesInside(state.nodes, state.userSelectionRect, state.transform);
const selectedNodes = state.selectedElements?.filter(isNode);
if (!selectedNodes.length) {
if (!selectedNodes) {
state.selectionActive = false;
state.userSelectionRect = { ...state.userSelectionRect, draw: false };
state.nodesSelectionActive = false;