Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
targetId = `${targetId[0]}-${targetId[1]}-${targetId[2]}`
} else {
sourceId = v.endPointSourceId
targetId = v.endPointTargetId
}
this.JspInstance.connect({
source: sourceId,
target: targetId,
type: 'basic',
paintStyle: { strokeWidth: 2, stroke: '#555' }
})
})
})
jsPlumb.fire('jsPlumbDemoLoaded', this.JspInstance)
// Connection monitoring
this.handleEvent()
// Drag and drop new nodes
this.draggable()
}
targetId = `${targetId[0]}-${targetId[1]}-${targetId[2]}`
} else {
sourceId = v.endPointSourceId
targetId = v.endPointTargetId
}
this.JspInstance.connect({
source: sourceId,
target: targetId,
type: 'basic',
paintStyle: { strokeWidth: 2, stroke: '#555' }
})
})
})
jsPlumb.fire('jsPlumbDemoLoaded', this.JspInstance)
// Connection monitoring
this.handleEvent()
// Drag and drop new nodes
this.draggable()
}
length: 6,
events: { // 终线箭头的点击事件
click: function (e) {
e.stopPropagation();
}
}
}],
['Label',
{label: '<i class="common-icon-dark-circle-close"></i>', id: 'label'}
]
],
Container: 'ktj-canvas' // 容器id
});
// 完成初始化
jsPlumb.fire('jsPlumbDemoLoaded', instance);
// flow插件初始化
var init = function () {
jsPlumb.setContainer(opts.canvas);
// 将所有节点包裹在内置的DIV
$nodeContainer.el = $(opts.canvas).find('.bk-flow-container');
// 加入基础样式class
$nodeContainer.el.css('position', 'relative');
_self.addClass('bk-flow-wrap');
$(opts.canvas).addClass('bk-flow-canvas');
// _initDragging();
// _initEvent();
};
overlays,
});
}
// init location
for (const i of flowData.location) {
$(`.${i[0]}`).css('left', i[1] * 20);
$(`.${i[0]}`).css('top', i[2] * 20);
}
for (const point of flowData.point) {
instance.draggable(`${point._id}`);
}
});
jsPlumb.fire('jsPlumbDemoLoaded', instance);
},
},