Comparing version 0.5.0 to 0.5.1
@@ -0,1 +1,10 @@ | ||
v0.5.1 | ||
====== | ||
Bug fixes and minor improvements: | ||
1. Add version property to the library | ||
2. Set graph dimensions on the input graph | ||
3. Export graphlib as a property of the dagre global | ||
v0.5.0 | ||
@@ -10,2 +19,6 @@ ====== | ||
Note: this version has dropped support for rank constraints. They may be added | ||
back at some point, but my priority is improving speed and working out any | ||
issues with clustering for the moment. | ||
v0.4.6 | ||
@@ -12,0 +25,0 @@ ====== |
@@ -29,3 +29,4 @@ /* | ||
notime: require("./lib/util").notime | ||
} | ||
}, | ||
version: require("./lib/version") | ||
}; |
@@ -48,2 +48,3 @@ "use strict"; | ||
time(" positionSelfEdges", function() { positionSelfEdges(g); }); | ||
time(" setGraphDimensions", function() { setGraphDimensions(g); }); | ||
time(" removeBorderNodes", function() { removeBorderNodes(g); }); | ||
@@ -88,2 +89,5 @@ time(" normalize.undo", function() { normalize.undo(g); }); | ||
}); | ||
inputGraph.graph().width = layoutGraph.graph().width; | ||
inputGraph.graph().height = layoutGraph.graph().height; | ||
} | ||
@@ -181,2 +185,15 @@ | ||
function setGraphDimensions(g) { | ||
var width = 0, | ||
height = 0, | ||
graph = g.graph(); | ||
_.each(g.nodes(), function(v) { | ||
var node = g.node(v); | ||
width = Math.max(width, node.x + node.width / 2); | ||
height = Math.max(height, node.y + node.height / 2); | ||
}); | ||
graph.width = width; | ||
graph.height = height; | ||
} | ||
function assignNodeIntersects(g) { | ||
@@ -183,0 +200,0 @@ _.each(g.edges(), function(e) { |
@@ -1,1 +0,1 @@ | ||
module.exports = "0.5.0"; | ||
module.exports = "0.5.1"; |
{ | ||
"name": "dagre", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Graph layout for JavaScript", | ||
@@ -23,3 +23,2 @@ "author": "Chris Pettitt <cpettitt@gmail.com>", | ||
"jshint-stylish": "^0.4.0", | ||
"lodash": "^2.4.1", | ||
"mocha": "^1.21.4", | ||
@@ -26,0 +25,0 @@ "semver": "^3.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
375785
11
2384
0