graph.js整合node和edge资源,对外提供访问接口
2017-08-27 13:09
447 查看
/*
Class: Graph
A Graph Class that provides useful manipulation functions. You can find more manipulation methods in the <Graph.Util> object.
An instance of this class can be accessed by using the *graph* parameter of any tree or graph visualization.
Example:
(start code js)
//create new visualization
var viz = new $jit.Viz(options);
//load JSON data
viz.loadJSON(json);
//access model
viz.graph; //<Graph> instance
(end code)
Implements:
The following <Graph.Util> methods are implemented in <Graph>
- <Graph.Util.getNode>
- <Graph.Util.eachNode>
- <Graph.Util.computeLevels>
- <Graph.Util.eachBFS>
- <Graph.Util.clean>
- <Graph.Util.getClosestNodeToPos>
- <Graph.Util.getClosestNodeToOrigin>
*/
$jit.Graph = new Class({
initialize: function(opt, Node, Edge, Label) {
this.Node = Node; //存储node的配置项
this.Edge = Edge; //存储edge的配置项
this.Label = Label;
this.opt = $.merge(innerOptions, opt || {});
this.nodes = {}; //存储所有的nodes
this.edges = {}; //存储所有的edges
},
getNode: function(id) {},
getByName: function(name) {},
getAdjacence: function (id, id2) {},
addNode: function(obj) {},
addAdjacence: function (obj, obj2, data) {},
removeNode: function(id) {},
removeAdjacence: function(id1, id2) {},
hasNode: function(id) {},
empty: function() {}
});
后续更新。。。。
Class: Graph
A Graph Class that provides useful manipulation functions. You can find more manipulation methods in the <Graph.Util> object.
An instance of this class can be accessed by using the *graph* parameter of any tree or graph visualization.
Example:
(start code js)
//create new visualization
var viz = new $jit.Viz(options);
//load JSON data
viz.loadJSON(json);
//access model
viz.graph; //<Graph> instance
(end code)
Implements:
The following <Graph.Util> methods are implemented in <Graph>
- <Graph.Util.getNode>
- <Graph.Util.eachNode>
- <Graph.Util.computeLevels>
- <Graph.Util.eachBFS>
- <Graph.Util.clean>
- <Graph.Util.getClosestNodeToPos>
- <Graph.Util.getClosestNodeToOrigin>
*/
$jit.Graph = new Class({
initialize: function(opt, Node, Edge, Label) {
this.Node = Node; //存储node的配置项
this.Edge = Edge; //存储edge的配置项
this.Label = Label;
this.opt = $.merge(innerOptions, opt || {});
this.nodes = {}; //存储所有的nodes
this.edges = {}; //存储所有的edges
},
getNode: function(id) {},
getByName: function(name) {},
getAdjacence: function (id, id2) {},
addNode: function(obj) {},
addAdjacence: function (obj, obj2, data) {},
removeNode: function(id) {},
removeAdjacence: function(id1, id2) {},
hasNode: function(id) {},
empty: function() {}
});
后续更新。。。。
相关文章推荐
- React-Native 获取node.js提供的接口
- 签到APP:android入门级小项目,Node.js 提供服务端接口
- 关于linux播放器mplayer对外提供接口与界面整合的总结
- 微信小程序访问node.js接口服务器搭建教程
- 用node.js express设置路径后 子路径下的页面访问静态资源路径出问题
- NodeJS express访问html,css,JS等静态资源文件
- 关于linux播放器madplay对外提供接口与界面整合的总结
- 关于linux播放器madplay对外提供接口与界面整合的总结
- 签到APP:android入门级小项目,Node.js 提供服务端接口。
- node.js通过edge访问.net动态链接库
- 微信小程序访问node.js接口服务器搭建教程
- Android硬件抽象层编写JNI方法提供Java访问硬件服务接口
- Node.js 学习资源总结
- node.js从入门到菜鸟——资源无法载入?你需要学会地址解析
- 在Ubuntu为Android硬件抽象层(HAL)模块编写JNI方法提供Java访问硬件服务接口
- SpringMvc、Maven整合FreeMarker--访问不到js、css
- 最新Node.js 资源汇总
- Node.js(window)基础(1)——用cmd命令行访问某一文件夹下的js文件
- 读书笔记 effective c++ Item 15 在资源管理类中提供对原生(raw)资源的访问
- 网络提供的证券实时数据访问接口