Skip to content

Commit

Permalink
record initial aspectmode safely
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Feb 14, 2020
1 parent 6ae2809 commit c730f12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plots/gl3d/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,15 +783,15 @@ proto.plot = function(sceneData, fullLayout, layout) {
*/
scene.glplot.setAspectratio(fullSceneLayout.aspectratio);

// save 'initial' camera view settings for modebar button
// save 'initial' aspectratio & aspectmode view settings for modebar buttons
if(!scene.viewInitial.aspectratio) {
scene.viewInitial.aspectratio = {
x: fullSceneLayout.aspectratio.x,
y: fullSceneLayout.aspectratio.y,
z: fullSceneLayout.aspectratio.z
};

// also keep track of aspectmode here
}
if(!scene.viewInitial.aspectmode) {
scene.viewInitial.aspectmode = fullSceneLayout.aspectmode;
}

Expand Down

0 comments on commit c730f12

Please sign in to comment.