jit.js源码解读

来源:互联网 发布:远程桌面控制软件下载 编辑:程序博客网 时间:2024/06/06 00:49

layouts.Tree.js


Layouts.Tree = (function() {

       .....

     return new Class({

           compute : function(property, computeLevels) {},

          computePositions : function(node, prop) {}

   });

})();


省略部分主要是一些内部函数:

 function getBoundaries(graph, config, level, orn, prop) {}

function movetree(node, prop, val, orn) {}

 function moveextent(extent, val) {}

function merge(ps, qs) {}

 function mergelist(ls, def) {}

function fit(ext1, ext2, subtreeOffset, siblingOffset, i) {}

function fitlistl(es, subtreeOffset, siblingOffset) {}

 function fitlistr(es, subtreeOffset, siblingOffset) {}

function fitlist(es, subtreeOffset, siblingOffset, align) {}

function design(graph, node, prop, config, orn) {}


后续更新。。。


spaceTree.js的inherit options and instance properties




Constructor Options:

Inherits options from

- <Options.Canvas>
- <Options.Controller>
- <Options.Tree>
- <Options.Node>
- <Options.Edge>
- <Options.Label>
- <Options.Events>
- <Options.Tips>
- <Options.NodeStyles>
- <Options.Navigation>



Instance Properties:

canvas - Access a <Canvas> instance.
graph - Access a <Graph> instance.
op - Access a <ST.Op> instance.
fx - Access a <ST.Plot> instance.
labels - Access a <ST.Label> interface implementation.





对应代码中





主要写法:

$jit.ST= (function() {
     returnnewClass({
Implements: [Loader, Extras, Layouts.Tree],
               initialize:function(controller) {
var$ST=$jit.ST;
},
plot:function() {},
switchPosition:function(pos,method,onComplete) {},
switchAlignment:function(align,method,onComplete) {},
addNodeInPath:function(id) {},
clearNodesInPath:function(id) {},
reposition:function() {},
requestNodes:function(node,onComplete) {},
contract:function(onComplete,switched) {},
move:function(node,onComplete) {},
expand:function (node,onComplete) {},
selectPath:function(node) {},
setRoot:function(id,method,onComplete) {},
addSubtree:function(subtree,method,onComplete) {},
removeSubtree:function(id,removeRoot,method,onComplete) {},
select:function(id,onComplete) {},
onClick:function (id,options) {}
})();

后续更新。。。











Constructor Options:

Inherits options from

- <Options.Canvas>
- <Options.Controller>
- <Options.Tree>
- <Options.Node>
- <Options.Edge>
- <Options.Label>
- <Options.Events>
- <Options.Tips>
- <Options.NodeStyles>
- <Options.Navigation>



Instance Properties:

canvas - Access a <Canvas> instance.
graph - Access a <Graph> instance.
op - Access a <ST.Op> instance.
fx - Access a <ST.Plot> instance.
labels - Access a <ST.Label> interface implementation.





对应代码中





主要写法:

$jit.ST= (function() {
     returnnewClass({
Implements: [Loader, Extras, Layouts.Tree],
               initialize:function(controller) {
var$ST=$jit.ST;
},
plot:function() {},
switchPosition:function(pos,method,onComplete) {},
switchAlignment:function(align,method,onComplete) {},
addNodeInPath:function(id) {},
clearNodesInPath:function(id) {},
reposition:function() {},
requestNodes:function(node,onComplete) {},
contract:function(onComplete,switched) {},
move:function(node,onComplete) {},
expand:function (node,onComplete) {},
selectPath:function(node) {},
setRoot:function(id,method,onComplete) {},
addSubtree:function(subtree,method,onComplete) {},
removeSubtree:function(id,removeRoot,method,onComplete) {},
select:function(id,onComplete) {},
onClick:function (id,options) {}
})();

后续更新。。。


原创粉丝点击