mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-31 23:47:28 -08:00
add functionality
This commit is contained in:
parent
400a7a6455
commit
a4ba7731ef
|
@ -107,6 +107,7 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import {
|
import {
|
||||||
Connection,
|
Connection,
|
||||||
|
Overlay,
|
||||||
OverlaySpec,
|
OverlaySpec,
|
||||||
} from 'jsplumb';
|
} from 'jsplumb';
|
||||||
import { MessageBoxInputData } from 'element-ui/types/message-box';
|
import { MessageBoxInputData } from 'element-ui/types/message-box';
|
||||||
|
@ -1394,12 +1395,18 @@ export default mixins(
|
||||||
'Label',
|
'Label',
|
||||||
{
|
{
|
||||||
id: 'connection-actions',
|
id: 'connection-actions',
|
||||||
label: `<div>${getIcon('plus')}</div> <div>${getIcon('trash')}</div>`,
|
label: `<div class="add">${getIcon('plus')}</div> <div class="delete">${getIcon('trash')}</div>`,
|
||||||
cssClass: 'connection-actions',
|
cssClass: 'connection-actions',
|
||||||
visible: false,
|
visible: false,
|
||||||
events: {
|
events: {
|
||||||
mousedown: (e) => {
|
mousedown: (overlay: Overlay, event: MouseEvent) => {
|
||||||
// this.__removeConnectionByConnectionInfo(info, true);
|
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');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue