Skip to content

Commit c730f12

Browse files
committed
record initial aspectmode safely
1 parent 6ae2809 commit c730f12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plots/gl3d/scene.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -783,15 +783,15 @@ proto.plot = function(sceneData, fullLayout, layout) {
783783
*/
784784
scene.glplot.setAspectratio(fullSceneLayout.aspectratio);
785785

786-
// save 'initial' camera view settings for modebar button
786+
// save 'initial' aspectratio & aspectmode view settings for modebar buttons
787787
if(!scene.viewInitial.aspectratio) {
788788
scene.viewInitial.aspectratio = {
789789
x: fullSceneLayout.aspectratio.x,
790790
y: fullSceneLayout.aspectratio.y,
791791
z: fullSceneLayout.aspectratio.z
792792
};
793-
794-
// also keep track of aspectmode here
793+
}
794+
if(!scene.viewInitial.aspectmode) {
795795
scene.viewInitial.aspectmode = fullSceneLayout.aspectmode;
796796
}
797797

0 commit comments

Comments
 (0)