From 75cca869b4b6339a82f66a42f6150e021f2e1849 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Thu, 24 Dec 2020 08:37:13 +0100 Subject: [PATCH] :zap: Fix issue that source node was also selected after duplicate --- packages/editor-ui/src/components/Node.vue | 2 +- packages/editor-ui/src/components/mixins/nodeBase.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/Node.vue b/packages/editor-ui/src/components/Node.vue index d8af701f4c..ab134df115 100644 --- a/packages/editor-ui/src/components/Node.vue +++ b/packages/editor-ui/src/components/Node.vue @@ -12,7 +12,7 @@
-
+
diff --git a/packages/editor-ui/src/components/mixins/nodeBase.ts b/packages/editor-ui/src/components/mixins/nodeBase.ts index 830d7ed2e0..bc8c3b1cc0 100644 --- a/packages/editor-ui/src/components/mixins/nodeBase.ts +++ b/packages/editor-ui/src/components/mixins/nodeBase.ts @@ -341,6 +341,14 @@ export const nodeBase = mixins( } }, mouseLeftClick (e: MouseEvent) { + // @ts-ignore + const path = e.path || (e.composedPath && e.composedPath()); + for (let index = 0; index < path.length; index++) { + if (path[index].className && typeof path[index].className === 'string' && path[index].className.includes('no-select-on-click')) { + return; + } + } + if (!this.isTouchDevice) { if (this.$store.getters.isActionActive('dragActive')) { this.$store.commit('removeActiveAction', 'dragActive');