Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a028e10

Browse filesBrowse files
committed
declare aspectmode variable
1 parent 9e864a5 commit a028e10
Copy full SHA for a028e10

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed

‎src/plots/gl3d/scene.js

Copy file name to clipboardExpand all lines: src/plots/gl3d/scene.js
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ proto.plot = function(sceneData, fullLayout, layout) {
725725
});
726726
}
727727

728+
var aspectmode = fullSceneLayout.aspectmode;
729+
728730
var axesScaleRatio = [1, 1, 1];
729731

730732
// Compute axis scale per category
@@ -741,7 +743,7 @@ proto.plot = function(sceneData, fullLayout, layout) {
741743
var axisAutoScaleFactor = 4;
742744
var aspectRatio;
743745

744-
if(fullSceneLayout.aspectmode === 'auto') {
746+
if(aspectmode === 'auto') {
745747
if(Math.max.apply(null, axesScaleRatio) / Math.min.apply(null, axesScaleRatio) <= axisAutoScaleFactor) {
746748
/*
747749
* USE DATA MODE WHEN AXIS RANGE DIMENSIONS ARE RELATIVELY EQUAL
@@ -754,11 +756,11 @@ proto.plot = function(sceneData, fullLayout, layout) {
754756
*/
755757
aspectRatio = [1, 1, 1];
756758
}
757-
} else if(fullSceneLayout.aspectmode === 'cube') {
759+
} else if(aspectmode === 'cube') {
758760
aspectRatio = [1, 1, 1];
759-
} else if(fullSceneLayout.aspectmode === 'data') {
761+
} else if(aspectmode === 'data') {
760762
aspectRatio = axesScaleRatio;
761-
} else if(fullSceneLayout.aspectmode === 'manual') {
763+
} else if(aspectmode === 'manual') {
762764
var userRatio = fullSceneLayout.aspectratio;
763765
aspectRatio = [userRatio.x, userRatio.y, userRatio.z];
764766
} else {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.