From 261966562064c81df09f7d4fdaf116fcb0e74ce6 Mon Sep 17 00:00:00 2001 From: fneur <33552046+fneur@users.noreply.github.com> Date: Tue, 18 Oct 2022 17:00:13 +0200 Subject: [PATCH 1/2] Fix bug in svgzoom --- ssvc-calc/ssvc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssvc-calc/ssvc.js b/ssvc-calc/ssvc.js index 47718b7c..161d3f17 100644 --- a/ssvc-calc/ssvc.js +++ b/ssvc-calc/ssvc.js @@ -2353,7 +2353,7 @@ function svgzoom(w) { return; } var fh = parseInt($('svg.mgraph').attr("height")); - var fw = parseInt($('svg.mgraph').attr("height")); + var fw = parseInt($('svg.mgraph').attr("width")); var vbox = "0 0 "+String(parseInt(fw/zf)) + " " + String(parseInt(fh/zf)) $('svg.mgraph').attr('viewBox',vbox); } From 3ea29cc6a2ae6b8f388aa08e86262b8605bf814b Mon Sep 17 00:00:00 2001 From: Vijay Sarvepalli Date: Tue, 18 Oct 2022 11:56:18 -0400 Subject: [PATCH 2/2] Update ssvc.js Fix Line 2349-2360 function svgzoom --- ssvc-calc/ssvc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssvc-calc/ssvc.js b/ssvc-calc/ssvc.js index 161d3f17..e125101c 100644 --- a/ssvc-calc/ssvc.js +++ b/ssvc-calc/ssvc.js @@ -2349,7 +2349,8 @@ function copym(containerid,ispurl) { function svgzoom(w) { var zf = w.value/w.max; if(zf > 0.95) { - $('svg.mgraph').attr('viewBox',''); + var vbox = $('svg.mgraph').attr('viewBox'); + console.log("The viewbox should be left as-is "+vbox); return; } var fh = parseInt($('svg.mgraph').attr("height"));