百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

linker

> 开发工具
开源

工作流程编辑器库

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

工作流程编辑器库


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.

Installation

1- Required files
xml
2- Add the html container
xml
3- Initialize the linker
javascript
$(document).ready(function () {
	var linker = $('#linker').linker();
});

Demo

You can download the demo files from dist folder

Live Demo

Usage

Add new node
javascript
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

Add new input
javascript
var node_in = node.input('input_id', 'Input Name');

You can add multiple inputs

Add new output
javascript
var node_out = node.output('output_id', 'Output Name');

You can add multiple outputs

Add path between two nodes
javascript
node_out.connect(node2_in);

You can connect the output to multiple inputs

Add path without triggering onConnect event
javascript
node_out.connect(node2_in, true);

Node Events

onDrag: When the node position change
javascript
node.onDrag = function (x, y) {
	console.log(x, y, this);
	
	// 'x, y' is the new position
	// 'this' is the node object
};
onDragFinish: When the dragging finish
javascript
node.onDragFinish = function (x, y) {
	console.log(x, y, this);
	
	// 'x, y' is the new position
	// 'this' is the node object
};
onRemove: When delete the node
javascript
node.onRemove = function () {
	console.log(this);
};
onSetting: When setting's icon clicked
javascript
node.onSetting = function () {
	alert('Setting ' + this.name);
};

Output Events

onConnect: When this output connect to new input
javascript
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
};
onRemove: When this output path remove
javascript
node_out.onRemove = function (index) {
	console.log(index)
};

Options

javascript
var linker = $('#linker').linker({ 
	// hide setting icons from the nodes
	settingIcon: false
});

Example

…

Development environment

nmp install to install required modules

gulp watch to compile sass and javascript files

Credits

Linker is inspired by NEditorJS

License

MIT

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScripteditornodeworkflow

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具