Skip to content

Commit

Permalink
Do it once.
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarst committed May 24, 2022
1 parent 9c96ff6 commit fe57e16
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/flamegraph/flamegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ function init(evt) {
var svgWidth = svg.width.baseVal.value;
searchbtn.attributes.x.value = svgWidth - xpad - 100;
matchedtxt.attributes.x.value = svgWidth - xpad - 100;

if (!isEdge) {
svg.removeAttribute("viewBox");
}
};
window.addEventListener('resize', function() {
update_for_width_change();
Expand All @@ -55,6 +51,9 @@ function init(evt) {
unzoom();
update_for_width_change();
restore_state();
if (!isEdge) {
svg.removeAttribute("viewBox");
}
}, 0);
} else {
restore_state();
Expand Down

0 comments on commit fe57e16

Please sign in to comment.