From adb39a6a2725767d0e9753a6caf76baa75b1af4a Mon Sep 17 00:00:00 2001 From: Soetji Anto Date: Fri, 8 Nov 2024 14:53:41 -0500 Subject: [PATCH 1/2] Use cy.extent() as layout bounding box --- src/extensions/layout/breadthfirst.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extensions/layout/breadthfirst.js b/src/extensions/layout/breadthfirst.js index eeaa2e01d..565a4a6a1 100644 --- a/src/extensions/layout/breadthfirst.js +++ b/src/extensions/layout/breadthfirst.js @@ -48,8 +48,9 @@ BreadthFirstLayout.prototype.run = function(){ const maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true const hasBoundingBox = !!options.boundingBox; + const cyExtent = cy.extent(); const bb = math.makeBoundingBox( hasBoundingBox ? options.boundingBox : { - x1: 0, y1: 0, w: cy.width(), h: cy.height() + x1: cyExtent.x1, y1: cyExtent.y1, w: cyExtent.w, h: cyExtent.h } ); let roots; From f2b8b8d8528bf4318dc7bfde4a962bd1e0d74dea Mon Sep 17 00:00:00 2001 From: Soetji Anto Date: Sun, 10 Nov 2024 23:29:29 -0500 Subject: [PATCH 2/2] npm install --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 96ea88cf2..ee267b28e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "cytoscape", - "version": "3.30.0-unstable", + "version": "3.31.0-unstable", "license": "MIT", "devDependencies": { "@babel/core": "^7.3.4",