Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dagre

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dagre - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

5

CHANGELOG.md

@@ -0,1 +1,6 @@

v0.3.7
======
* Add bounding box information to output graph
v0.3.6

@@ -2,0 +7,0 @@ ======

@@ -227,2 +227,17 @@ var util = require('./util'),

});
// Attach bounding box information
var maxX = 0, maxY = 0;
g.eachNode(function(u, value) {
maxX = Math.max(maxX, value.x + value.width / 2);
maxY = Math.max(maxY, value.y + value.height / 2);
});
g.eachEdge(function(e, u, v, value) {
var maxXPoints = Math.max.apply(Math, value.points.map(function(p) { return p.x; }));
var maxYPoints = Math.max.apply(Math, value.points.map(function(p) { return p.y; }));
maxX = Math.max(maxX, maxXPoints + value.width / 2);
maxY = Math.max(maxY, maxYPoints + value.height / 2);
});
out.graph().bbox = { width: maxX, height: maxY };
return out;

@@ -229,0 +244,0 @@ }

2

lib/version.js

@@ -1,1 +0,1 @@

module.exports = '0.3.6';
module.exports = '0.3.7';
{
"name": "dagre",
"version": "0.3.6",
"version": "0.3.7",
"description": "Graph layout for JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc