fix(edgeupdater): check if element below is updater

This commit is contained in:
moklick
2021-03-22 10:50:56 +01:00
parent 8e99cdb213
commit 429c638710
+2 -1
View File
@@ -101,8 +101,9 @@ export function onMouseDown(
const elementBelow = document.elementFromPoint(event.clientX, event.clientY);
const elementBelowIsTarget = elementBelow?.classList.contains('target');
const elementBelowIsSource = elementBelow?.classList.contains('source');
const elementBelowIsUpdater = elementBelow?.classList.contains('react-flow__edgeupdater');
if (!reactFlowNode || (!elementBelowIsTarget && !elementBelowIsSource)) {
if (!reactFlowNode || (!elementBelowIsTarget && !elementBelowIsSource && !elementBelowIsUpdater)) {
return;
}