Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Preserve gl3d scene aspectratio after orthographic scroll zoom #4578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 12, 2020
Merged
Prev Previous commit
Next Next commit
do not use sceneLayout variable name for fullSceneLayout
  • Loading branch information
archmoj committed Feb 12, 2020
commit 078d80035d91cdddccf1542f48be1f5fb878ccda
10 changes: 5 additions & 5 deletions src/plots/gl3d/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,12 @@ proto.recoverContext = function() {
var axisProperties = [ 'xaxis', 'yaxis', 'zaxis' ];

function computeTraceBounds(scene, trace, bounds) {
var sceneLayout = scene.fullSceneLayout;
var fullSceneLayout = scene.fullSceneLayout;

for(var d = 0; d < 3; d++) {
var axisName = axisProperties[d];
var axLetter = axisName.charAt(0);
var ax = sceneLayout[axisName];
var ax = fullSceneLayout[axisName];
var coords = trace[axLetter];
var calendar = trace[axLetter + 'calendar'];
var len = trace['_' + axLetter + 'length'];
Expand Down Expand Up @@ -509,13 +509,13 @@ function computeTraceBounds(scene, trace, bounds) {
}

function computeAnnotationBounds(scene, bounds) {
var sceneLayout = scene.fullSceneLayout;
var annotations = sceneLayout.annotations || [];
var fullSceneLayout = scene.fullSceneLayout;
var annotations = fullSceneLayout.annotations || [];

for(var d = 0; d < 3; d++) {
var axisName = axisProperties[d];
var axLetter = axisName.charAt(0);
var ax = sceneLayout[axisName];
var ax = fullSceneLayout[axisName];

for(var j = 0; j < annotations.length; j++) {
var ann = annotations[j];
Expand Down