Skip to content

Commit 3d37b36

Browse files
committed
v0.8.61
1 parent a95f022 commit 3d37b36

9 files changed

+11
-14
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dagre",
3-
"version": "0.8.6",
3+
"version": "0.8.61",
44
"main": [
55
"dist/dagre.core.js"
66
],

dist/dagre.core.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,6 @@ function positionY(g) {
22662266
var labelheight = 0;
22672267
_.forEach(layer, function(v) {
22682268
var node = g.node(v);
2269-
console.log("nodeY", node);
22702269
if (node.dummy === "border" && node.whimNode) {
22712270
borderTopSeen = true;
22722271
labelheight = node.labelheight;
@@ -2979,7 +2978,7 @@ function notime(name, fn) {
29792978
}
29802979

29812980
},{"./graphlib":7,"./lodash":10}],30:[function(require,module,exports){
2982-
module.exports = "0.8.6";
2981+
module.exports = "0.8.61";
29832982

29842983
},{}]},{},[1])(1)
29852984
});

dist/dagre.core.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dagre.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,6 @@ function positionY(g) {
22662266
var labelheight = 0;
22672267
_.forEach(layer, function(v) {
22682268
var node = g.node(v);
2269-
console.log("nodeY", node);
22702269
if (node.dummy === "border" && node.whimNode) {
22712270
borderTopSeen = true;
22722271
labelheight = node.labelheight;
@@ -2979,7 +2978,7 @@ function notime(name, fn) {
29792978
}
29802979

29812980
},{"./graphlib":7,"./lodash":10}],30:[function(require,module,exports){
2982-
module.exports = "0.8.6";
2981+
module.exports = "0.8.61";
29832982

29842983
},{}],31:[function(require,module,exports){
29852984
/**

dist/dagre.min.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ _.forEach(align,function(v){xs[v]=xs[root[v]]});return xs}function buildBlockGra
323323
* the minimum coordinate of the smallest width alignment and right-biased
324324
* alignments have their maximum coordinate at the same point as the maximum
325325
* coordinate of the smallest width alignment.
326-
*/function alignCoordinates(xss,alignTo){var alignToVals=_.values(alignTo),alignToMin=_.min(alignToVals),alignToMax=_.max(alignToVals);_.forEach(["u","d"],function(vert){_.forEach(["l","r"],function(horiz){var alignment=vert+horiz,xs=xss[alignment],delta;if(xs===alignTo)return;var xsVals=_.values(xs);delta=horiz==="l"?alignToMin-_.min(xsVals):alignToMax-_.max(xsVals);if(delta){xss[alignment]=_.mapValues(xs,function(x){return x+delta})}})})}function balance(xss,align){return _.mapValues(xss.ul,function(ignore,v){if(align){return xss[align.toLowerCase()][v]}else{var xs=_.sortBy(_.map(xss,v));return(xs[1]+xs[2])/2}})}function positionX(g){var layering=util.buildLayerMatrix(g);var conflicts=_.merge(findType1Conflicts(g,layering),findType2Conflicts(g,layering));var xss={};var adjustedLayering;_.forEach(["u","d"],function(vert){adjustedLayering=vert==="u"?layering:_.values(layering).reverse();_.forEach(["l","r"],function(horiz){if(horiz==="r"){adjustedLayering=_.map(adjustedLayering,function(inner){return _.values(inner).reverse()})}var neighborFn=(vert==="u"?g.predecessors:g.successors).bind(g);var align=verticalAlignment(g,adjustedLayering,conflicts,neighborFn);var xs=horizontalCompaction(g,adjustedLayering,align.root,align.align,horiz==="r");if(horiz==="r"){xs=_.mapValues(xs,function(x){return-x})}xss[vert+horiz]=xs})});var smallestWidth=findSmallestWidthAlignment(g,xss);alignCoordinates(xss,smallestWidth);return balance(xss,g.graph().align)}function sep(nodeSep,edgeSep,reverseSep){return function(g,v,w){var vLabel=g.node(v);var wLabel=g.node(w);var sum=0;var delta;sum+=vLabel.width/2;if(_.has(vLabel,"labelpos")){switch(vLabel.labelpos.toLowerCase()){case"l":delta=-vLabel.width/2;break;case"r":delta=vLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;sum+=(vLabel.dummy?edgeSep:nodeSep)/2;sum+=(wLabel.dummy?edgeSep:nodeSep)/2;sum+=wLabel.width/2;if(_.has(wLabel,"labelpos")){switch(wLabel.labelpos.toLowerCase()){case"l":delta=wLabel.width/2;break;case"r":delta=-wLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;return sum}}function width(g,v){return g.node(v).width}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(require,module,exports){"use strict";var _=require("../lodash");var util=require("../util");var positionX=require("./bk").positionX;module.exports=position;function position(g){g=util.asNonCompoundGraph(g);positionY(g);_.forEach(positionX(g),function(x,v){g.node(v).x=x})}function positionY(g){var layering=util.buildLayerMatrix(g);var rankSep=g.graph().ranksep;var prevY=0;_.forEach(layering,function(layer){var maxHeight=_.max(_.map(layer,function(v){return g.node(v).height}));var borderTopSeen=false;var labelheight=0;_.forEach(layer,function(v){var node=g.node(v);console.log("nodeY",node);if(node.dummy==="border"&&node.whimNode){borderTopSeen=true;labelheight=node.labelheight}node.y=prevY+maxHeight/2});if(borderTopSeen){prevY+=maxHeight+labelheight+24}else{prevY+=maxHeight+rankSep}})}},{"../lodash":10,"../util":29,"./bk":23}],25:[function(require,module,exports){"use strict";var _=require("../lodash");var Graph=require("../graphlib").Graph;var slack=require("./util").slack;module.exports=feasibleTree;
326+
*/function alignCoordinates(xss,alignTo){var alignToVals=_.values(alignTo),alignToMin=_.min(alignToVals),alignToMax=_.max(alignToVals);_.forEach(["u","d"],function(vert){_.forEach(["l","r"],function(horiz){var alignment=vert+horiz,xs=xss[alignment],delta;if(xs===alignTo)return;var xsVals=_.values(xs);delta=horiz==="l"?alignToMin-_.min(xsVals):alignToMax-_.max(xsVals);if(delta){xss[alignment]=_.mapValues(xs,function(x){return x+delta})}})})}function balance(xss,align){return _.mapValues(xss.ul,function(ignore,v){if(align){return xss[align.toLowerCase()][v]}else{var xs=_.sortBy(_.map(xss,v));return(xs[1]+xs[2])/2}})}function positionX(g){var layering=util.buildLayerMatrix(g);var conflicts=_.merge(findType1Conflicts(g,layering),findType2Conflicts(g,layering));var xss={};var adjustedLayering;_.forEach(["u","d"],function(vert){adjustedLayering=vert==="u"?layering:_.values(layering).reverse();_.forEach(["l","r"],function(horiz){if(horiz==="r"){adjustedLayering=_.map(adjustedLayering,function(inner){return _.values(inner).reverse()})}var neighborFn=(vert==="u"?g.predecessors:g.successors).bind(g);var align=verticalAlignment(g,adjustedLayering,conflicts,neighborFn);var xs=horizontalCompaction(g,adjustedLayering,align.root,align.align,horiz==="r");if(horiz==="r"){xs=_.mapValues(xs,function(x){return-x})}xss[vert+horiz]=xs})});var smallestWidth=findSmallestWidthAlignment(g,xss);alignCoordinates(xss,smallestWidth);return balance(xss,g.graph().align)}function sep(nodeSep,edgeSep,reverseSep){return function(g,v,w){var vLabel=g.node(v);var wLabel=g.node(w);var sum=0;var delta;sum+=vLabel.width/2;if(_.has(vLabel,"labelpos")){switch(vLabel.labelpos.toLowerCase()){case"l":delta=-vLabel.width/2;break;case"r":delta=vLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;sum+=(vLabel.dummy?edgeSep:nodeSep)/2;sum+=(wLabel.dummy?edgeSep:nodeSep)/2;sum+=wLabel.width/2;if(_.has(wLabel,"labelpos")){switch(wLabel.labelpos.toLowerCase()){case"l":delta=wLabel.width/2;break;case"r":delta=-wLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;return sum}}function width(g,v){return g.node(v).width}},{"../graphlib":7,"../lodash":10,"../util":29}],24:[function(require,module,exports){"use strict";var _=require("../lodash");var util=require("../util");var positionX=require("./bk").positionX;module.exports=position;function position(g){g=util.asNonCompoundGraph(g);positionY(g);_.forEach(positionX(g),function(x,v){g.node(v).x=x})}function positionY(g){var layering=util.buildLayerMatrix(g);var rankSep=g.graph().ranksep;var prevY=0;_.forEach(layering,function(layer){var maxHeight=_.max(_.map(layer,function(v){return g.node(v).height}));var borderTopSeen=false;var labelheight=0;_.forEach(layer,function(v){var node=g.node(v);if(node.dummy==="border"&&node.whimNode){borderTopSeen=true;labelheight=node.labelheight}node.y=prevY+maxHeight/2});if(borderTopSeen){prevY+=maxHeight+labelheight+24}else{prevY+=maxHeight+rankSep}})}},{"../lodash":10,"../util":29,"./bk":23}],25:[function(require,module,exports){"use strict";var _=require("../lodash");var Graph=require("../graphlib").Graph;var slack=require("./util").slack;module.exports=feasibleTree;
327327
/*
328328
* Constructs a spanning tree with tight edges and adjusted the input node's
329329
* ranks to achieve this. A tight edge is one that is has a length that matches
@@ -513,7 +513,7 @@ function addWhimBorderNode(g,prefix,labelHeight){var node={width:0,height:0,whim
513513
/*
514514
* Returns a new function that wraps `fn` with a timer. The wrapper logs the
515515
* time it takes to execute the function.
516-
*/function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":7,"./lodash":10}],30:[function(require,module,exports){module.exports="0.8.6"},{}],31:[function(require,module,exports){
516+
*/function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":7,"./lodash":10}],30:[function(require,module,exports){module.exports="0.8.61"},{}],31:[function(require,module,exports){
517517
/**
518518
* Copyright (c) 2014, Chris Pettitt
519519
* All rights reserved.

lib/position/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function positionY(g) {
2525
var labelheight = 0;
2626
_.forEach(layer, function(v) {
2727
var node = g.node(v);
28-
console.log("nodeY", node);
2928
if (node.dummy === "border" && node.whimNode) {
3029
borderTopSeen = true;
3130
labelheight = node.labelheight;

lib/version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = "0.8.6";
1+
module.exports = "0.8.61";

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@whimsicalcode/dagre",
3-
"version": "0.8.6",
3+
"version": "0.8.61",
44
"description": "Graph layout for JavaScript",
55
"author": "Chris Pettitt <[email protected]>",
66
"contributors": [

0 commit comments

Comments
 (0)