fix NodeSelection appearing when no nodes are selected
This commit is contained in:
@@ -31,7 +31,12 @@
|
|||||||
if (store.selectionRectMode === 'nodes') {
|
if (store.selectionRectMode === 'nodes') {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
store.nodes;
|
store.nodes;
|
||||||
return getInternalNodesBounds(store.nodeLookup, { filter: (node) => !!node.selected });
|
const nodeBounds = getInternalNodesBounds(store.nodeLookup, {
|
||||||
|
filter: (node) => !!node.selected
|
||||||
|
});
|
||||||
|
if (nodeBounds.width > 0 && nodeBounds.height > 0) {
|
||||||
|
return nodeBounds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user