Fix issue that source node was also selected after duplicate

This commit is contained in:
Jan Oberhauser 2020-12-24 08:37:13 +01:00
parent 9dfcfc72bd
commit 75cca869b4
2 changed files with 9 additions and 1 deletions

View file

@ -12,7 +12,7 @@
<div class="node-executing-info" title="Node is executing"> <div class="node-executing-info" title="Node is executing">
<font-awesome-icon icon="sync-alt" spin /> <font-awesome-icon icon="sync-alt" spin />
</div> </div>
<div class="node-options" v-if="!isReadOnly"> <div class="node-options no-select-on-click" v-if="!isReadOnly">
<div v-touch:tap="deleteNode" class="option" title="Delete Node" > <div v-touch:tap="deleteNode" class="option" title="Delete Node" >
<font-awesome-icon icon="trash" /> <font-awesome-icon icon="trash" />
</div> </div>

View file

@ -341,6 +341,14 @@ export const nodeBase = mixins(
} }
}, },
mouseLeftClick (e: MouseEvent) { 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.isTouchDevice) {
if (this.$store.getters.isActionActive('dragActive')) { if (this.$store.getters.isActionActive('dragActive')) {
this.$store.commit('removeActiveAction', 'dragActive'); this.$store.commit('removeActiveAction', 'dragActive');