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

Skip to content

Commit 4710c12

Browse files
committed
Update canvas size properly
1 parent 368fe44 commit 4710c12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plot_api/plot_api.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,8 +3051,6 @@ function makePlotFramework(gd) {
30513051
.attr('class', function(d) {
30523052
return 'gl-canvas gl-canvas-' + d.key.replace('Layer', '');
30533053
})
3054-
.attr('width', fullLayout.width)
3055-
.attr('height', fullLayout.height)
30563054
.style('position', 'absolute')
30573055
.style('top', 0)
30583056
.style('left', 0)
@@ -3065,6 +3063,10 @@ function makePlotFramework(gd) {
30653063
}
30663064
}
30673065

3066+
fullLayout._glcanvas
3067+
.attr('width', fullLayout.width)
3068+
.attr('height', fullLayout.width);
3069+
30683070
fullLayout._paperdiv.selectAll('.main-svg').remove();
30693071

30703072
fullLayout._paper = fullLayout._paperdiv.insert('svg', ':first-child')

0 commit comments

Comments
 (0)