工作流程编辑器库
Linker is Node Editor Library, I built this library for a new project I'm working on, besides I was interested in building one.
Note: This is a beta version.
$(document).ready(function () {
var linker = $('#linker').linker();
});You can download the demo files from dist folder
var node = linker.node({id: 'first', name: 'First Node', x: 100, y: 100});You can pass any data as a node and read it from the events handler
var node_in = node.input('input_id', 'Input Name');You can add multiple inputs
var node_out = node.output('output_id', 'Output Name');You can add multiple outputs
node_out.connect(node2_in);You can connect the output to multiple inputs
node_out.connect(node2_in, true);node.onDrag = function (x, y) {
console.log(x, y, this);
// 'x, y' is the new position
// 'this' is the node object
};node.onDragFinish = function (x, y) {
console.log(x, y, this);
// 'x, y' is the new position
// 'this' is the node object
};node.onRemove = function () {
console.log(this);
};node.onSetting = function () {
alert('Setting ' + this.name);
};node_out.onConnect = function (input) {
console.log(this, input);
// 'this' is the output object
// 'this.node' is the output parent node object
// '$(this.el)' is the output DOM element
// 'input' is the input object
// 'input.node' is the output parent node object
// '$(input.el)' is the input DOM element
};node_out.onRemove = function (index) {
console.log(index)
};var linker = $('#linker').linker({
// hide setting icons from the nodes
settingIcon: false
});…nmp install to install required modules
gulp watch to compile sass and javascript files
Linker is inspired by NEditorJS
MIT
暂无开放 Issues,或尚未同步最近议题。