Skip to content

Commit 1339f55

Browse files
committed
Building for release
1 parent 9459f01 commit 1339f55

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dagre",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"main": [
55
"dist/dagre.core.js"
66
],

dist/dagre.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ function updateInputGraph(inputGraph, layoutGraph) {
532532
let graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"];
533533
let graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" };
534534
let graphAttrs = ["acyclicer", "ranker", "rankdir", "align"];
535-
let nodeNumAttrs = ["width", "height"];
535+
let nodeNumAttrs = ["width", "height", "rank"];
536536
let nodeDefaults = { width: 0, height: 0 };
537537
let edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"];
538538
let edgeDefaults = {
@@ -2330,10 +2330,16 @@ module.exports = rank;
23302330
* fix them up later.
23312331
*/
23322332
function rank(g) {
2333+
var ranker = g.graph().ranker;
2334+
if (ranker instanceof Function) {
2335+
return ranker(g);
2336+
}
2337+
23332338
switch(g.graph().ranker) {
23342339
case "network-simplex": networkSimplexRanker(g); break;
23352340
case "tight-tree": tightTreeRanker(g); break;
23362341
case "longest-path": longestPathRanker(g); break;
2342+
case "none": break;
23372343
default: networkSimplexRanker(g);
23382344
}
23392345
}
@@ -2690,10 +2696,10 @@ module.exports = {
26902696
* Adds a dummy node to the graph and return v.
26912697
*/
26922698
function addDummyNode(g, type, attrs, name) {
2693-
let v;
2694-
do {
2699+
var v = name;
2700+
while (g.hasNode(v)) {
26952701
v = uniqueId(name);
2696-
} while (g.hasNode(v));
2702+
}
26972703

26982704
attrs.dummy = type;
26992705
g.setNode(v, attrs);
@@ -2937,7 +2943,7 @@ function notime(name, fn) {
29372943
let idCounter = 0;
29382944
function uniqueId(prefix) {
29392945
var id = ++idCounter;
2940-
return toString(prefix) + id;
2946+
return prefix + ("" + id);
29412947
}
29422948

29432949
function range(start, limit, step = 1) {
@@ -2990,7 +2996,7 @@ function zipObject(props, values) {
29902996
}
29912997

29922998
},{"@dagrejs/graphlib":29}],28:[function(require,module,exports){
2993-
module.exports = "1.1.4";
2999+
module.exports = "1.1.5";
29943000

29953001
},{}],29:[function(require,module,exports){
29963002
/**

dist/dagre.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)