@@ -725,6 +725,8 @@ proto.plot = function(sceneData, fullLayout, layout) {
725
725
} ) ;
726
726
}
727
727
728
+ var aspectmode = fullSceneLayout . aspectmode ;
729
+
728
730
var axesScaleRatio = [ 1 , 1 , 1 ] ;
729
731
730
732
// Compute axis scale per category
@@ -741,7 +743,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
741
743
var axisAutoScaleFactor = 4 ;
742
744
var aspectRatio ;
743
745
744
- if ( fullSceneLayout . aspectmode === 'auto' ) {
746
+ if ( aspectmode === 'auto' ) {
745
747
if ( Math . max . apply ( null , axesScaleRatio ) / Math . min . apply ( null , axesScaleRatio ) <= axisAutoScaleFactor ) {
746
748
/*
747
749
* USE DATA MODE WHEN AXIS RANGE DIMENSIONS ARE RELATIVELY EQUAL
@@ -754,11 +756,11 @@ proto.plot = function(sceneData, fullLayout, layout) {
754
756
*/
755
757
aspectRatio = [ 1 , 1 , 1 ] ;
756
758
}
757
- } else if ( fullSceneLayout . aspectmode === 'cube' ) {
759
+ } else if ( aspectmode === 'cube' ) {
758
760
aspectRatio = [ 1 , 1 , 1 ] ;
759
- } else if ( fullSceneLayout . aspectmode === 'data' ) {
761
+ } else if ( aspectmode === 'data' ) {
760
762
aspectRatio = axesScaleRatio ;
761
- } else if ( fullSceneLayout . aspectmode === 'manual' ) {
763
+ } else if ( aspectmode === 'manual' ) {
762
764
var userRatio = fullSceneLayout . aspectratio ;
763
765
aspectRatio = [ userRatio . x , userRatio . y , userRatio . z ] ;
764
766
} else {
0 commit comments