From c6dd331eb6e31fb9465cf8fc73acf14af18fe498 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Fri, 2 Aug 2024 11:35:51 +0200 Subject: [PATCH] fix: zoomTo to use svg size and not graph size --- index.html | 2 +- main.js | 2 +- versioning.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 02436228..d4ed06de 100644 --- a/index.html +++ b/index.html @@ -8117,7 +8117,7 @@ - + diff --git a/main.js b/main.js index 29af6392..910659c3 100644 --- a/main.js +++ b/main.js @@ -457,7 +457,7 @@ function handleZoom(isScaleChanged, isPositionChanged) { // Zoom to a specific point function zoomTo(x, y, z = 8, d = 2000) { - const transform = d3.zoomIdentity.translate(x * -z + graphWidth / 2, y * -z + graphHeight / 2).scale(z); + const transform = d3.zoomIdentity.translate(x * -z + svgWidth / 2, y * -z + svgHeight / 2).scale(z); svg.transition().duration(d).call(zoom.transform, transform); } diff --git a/versioning.js b/versioning.js index 88bcbd93..b934ad39 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.98.06"; // generator version, update each time +const version = "1.98.07"; // generator version, update each time { document.title += " v" + version;