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');
+ }
},
},
},