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

Skip to content

Commit f276f84

Browse files
committed
rm useless logic in gl3d .plot
- setting paperdiv style is done in the layoutStyles plot_api subroutine
1 parent d88abf8 commit f276f84

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/plots/gl3d/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,13 @@ exports.plot = function plotGl3d(gd) {
3737
fullData = gd._fullData,
3838
sceneIds = Plots.getSubplotIds(fullLayout, 'gl3d');
3939

40-
fullLayout._paperdiv.style({
41-
width: fullLayout.width + 'px',
42-
height: fullLayout.height + 'px'
43-
});
44-
45-
gd._context.setBackground(gd, fullLayout.paper_bgcolor);
46-
4740
for(var i = 0; i < sceneIds.length; i++) {
4841
var sceneId = sceneIds[i],
4942
fullSceneData = Plots.getSubplotData(fullData, 'gl3d', sceneId),
5043
sceneLayout = fullLayout[sceneId],
5144
scene = sceneLayout._scene;
5245

53-
// If Scene is not instantiated, create one!
54-
if(scene === undefined) {
46+
if(!scene) {
5547
initAxes(gd, sceneLayout);
5648

5749
scene = new Scene({

0 commit comments

Comments
 (0)