Skip to content

Commit 1828797

Browse files
committed
avoid using temporary _aspectmode
1 parent 078d800 commit 1828797

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/plots/gl3d/scene.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ proto.initializeGLPlot = function() {
246246
y: s * o.y,
247247
z: s * o.z
248248
});
249-
scene._aspectmode = 'manual';
249+
scene.fullSceneLayout.aspectmode = layout[scene.id].aspectmode = 'manual';
250250
}
251251

252252
relayoutCallback(scene);
@@ -730,7 +730,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
730730
* Dynamically set the aspect ratio depending on the users aspect settings
731731
*/
732732
var aspectRatio;
733-
var aspectmode = scene._aspectmode || fullSceneLayout.aspectmode;
733+
var aspectmode = fullSceneLayout.aspectmode;
734734
if(aspectmode === 'cube') {
735735
aspectRatio = [1, 1, 1];
736736
} else if(aspectmode === 'manual') {
@@ -763,7 +763,6 @@ proto.plot = function(sceneData, fullLayout, layout) {
763763
} else {
764764
throw new Error('scene.js aspectRatio was not one of the enumerated types');
765765
}
766-
scene._aspectmode = aspectmode;
767766

768767
/*
769768
* Write aspect Ratio back to user data and fullLayout so that it is modifies as user

0 commit comments

Comments
 (0)