Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 351f830

Browse files
committed
add a viewBox attribute to all svg containers
1 parent f66aff3 commit 351f830

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plot_api/subroutines.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ function lsInner(gd) {
6262
height: (gd._context.responsive && fullLayout.autosize && !gd._context._hasZeroHeight && !gd.layout.height) ? '100%' : fullLayout.height + 'px'
6363
})
6464
.selectAll('.main-svg')
65-
.call(Drawing.setSize, fullLayout.width, fullLayout.height);
65+
.call(Drawing.setSize, fullLayout.width, fullLayout.height)
66+
.attr('viewbox', '0 0 ' + fullLayout.width + ' ' + fullLayout.height)
6667
gd._context.setBackground(gd, fullLayout.paper_bgcolor);
6768

6869
exports.drawMainTitle(gd);

0 commit comments

Comments
 (0)