Skip to content

Commit c032b5d

Browse files
Fix zoom control: Initialize SVG viewBox on creation
Set viewBox attribute when SVG is created to match initial dimensions (100% zoom). This prevents unexpected visual changes on first zoom control interaction. Fixes issue where graph would jump/resize on first click of zoom slider even at 100%. Co-authored-by: sei-vsarvepalli <[email protected]>
1 parent a95fa22 commit c032b5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/ssvc-explorer/simple.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ const graphModule = (function() {
131131
.attr("class","mgraph")
132132
.attr("width", svg_width)
133133
.attr("height", svg_height)
134+
.attr("viewBox", "0 0 " + svg_width + " " + svg_height)
134135
.append("g")
135136
.attr("transform", default_translate)
136137
.attr("id","pgroup");

0 commit comments

Comments
 (0)