From a4ba7731ef14c832382bda2832c76ff1e98e7f60 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Wed, 13 Oct 2021 16:08:45 +0200 Subject: [PATCH] add functionality --- packages/editor-ui/src/views/NodeView.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 4937c29720..a1d7176d3d 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -107,6 +107,7 @@ import Vue from 'vue'; import { Connection, + Overlay, OverlaySpec, } from 'jsplumb'; import { MessageBoxInputData } from 'element-ui/types/message-box'; @@ -1394,12 +1395,18 @@ export default mixins( 'Label', { id: 'connection-actions', - label: `
${getIcon('plus')}
${getIcon('trash')}
`, + label: `
${getIcon('plus')}
${getIcon('trash')}
`, cssClass: 'connection-actions', visible: false, events: { - mousedown: (e) => { - // this.__removeConnectionByConnectionInfo(info, true); + mousedown: (overlay: Overlay, event: MouseEvent) => { + const element = event.target as HTMLElement; + if (element.classList.contains('delete') || (element.parentElement && element.parentElement.classList.contains('delete'))) { + this.__removeConnectionByConnectionInfo(info, true); + } + if (element.classList.contains('add') || (element.parentElement && element.parentElement.classList.contains('add'))) { + console.log('add'); + } }, }, },