Skip to content

Commit

Permalink
avoid using temporary _aspectmode
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Feb 12, 2020
1 parent 078d800 commit 1828797
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plots/gl3d/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ proto.initializeGLPlot = function() {
y: s * o.y,
z: s * o.z
});
scene._aspectmode = 'manual';
scene.fullSceneLayout.aspectmode = layout[scene.id].aspectmode = 'manual';
}

relayoutCallback(scene);
Expand Down Expand Up @@ -730,7 +730,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
* Dynamically set the aspect ratio depending on the users aspect settings
*/
var aspectRatio;
var aspectmode = scene._aspectmode || fullSceneLayout.aspectmode;
var aspectmode = fullSceneLayout.aspectmode;
if(aspectmode === 'cube') {
aspectRatio = [1, 1, 1];
} else if(aspectmode === 'manual') {
Expand Down Expand Up @@ -763,7 +763,6 @@ proto.plot = function(sceneData, fullLayout, layout) {
} else {
throw new Error('scene.js aspectRatio was not one of the enumerated types');
}
scene._aspectmode = aspectmode;

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

0 comments on commit 1828797

Please sign in to comment.