From 14ae2a316d1bfb80f2ffb7f82f5e907f8e75aec8 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 27 Sep 2022 15:48:07 -0400 Subject: [PATCH] Undo changes from #242. --- src/flamegraph/flamegraph.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flamegraph/flamegraph.js b/src/flamegraph/flamegraph.js index fae5f553..954b465a 100644 --- a/src/flamegraph/flamegraph.js +++ b/src/flamegraph/flamegraph.js @@ -24,6 +24,9 @@ function init(evt) { svg.removeAttribute("width"); // Edge requires us to have a viewBox that gets updated with size changes. var isEdge = /Edge\/\d./i.test(navigator.userAgent); + if (!isEdge) { + svg.removeAttribute("viewBox"); + } var update_for_width_change = function() { if (isEdge) { svg.attributes.viewBox.value = "0 0 " + svg.width.baseVal.value + " " + svg.height.baseVal.value; @@ -51,9 +54,6 @@ function init(evt) { unzoom(); update_for_width_change(); restore_state(); - if (!isEdge) { - svg.removeAttribute("viewBox"); - } }, 0); } else { restore_state();