@@ -255,7 +255,7 @@ function initializeGLPlot(scene, camera, pixelRatio, canvas, gl) {
255
255
if ( scene . fullSceneLayout . dragmode === false ) return ;
256
256
257
257
var update = { } ;
258
- update [ scene . id + '.camera' ] = getLayoutCamera ( scene . camera , scene . camera . _ortho ) ;
258
+ update [ scene . id + '.camera' ] = getLayoutCamera ( scene . camera ) ;
259
259
scene . saveCamera ( gd . layout ) ;
260
260
scene . graphDiv . emit ( 'plotly_relayout' , update ) ;
261
261
} ;
@@ -758,19 +758,19 @@ function getOrbitCamera(camera) {
758
758
759
759
// getLayoutCamera :: orbit_camera_coords -> plotly_coords
760
760
// inverse of getOrbitCamera
761
- function getLayoutCamera ( camera , isOrtho ) {
761
+ function getLayoutCamera ( camera ) {
762
762
return {
763
763
up : { x : camera . up [ 0 ] , y : camera . up [ 1 ] , z : camera . up [ 2 ] } ,
764
764
center : { x : camera . center [ 0 ] , y : camera . center [ 1 ] , z : camera . center [ 2 ] } ,
765
765
eye : { x : camera . eye [ 0 ] , y : camera . eye [ 1 ] , z : camera . eye [ 2 ] } ,
766
- projection : { type : ( isOrtho === true ) ? 'orthographic' : 'perspective' }
766
+ projection : { type : ( camera . _ortho === true ) ? 'orthographic' : 'perspective' }
767
767
} ;
768
768
}
769
769
770
770
// get camera position in plotly coords from 'orbit-camera' coords
771
771
proto . getCamera = function getCamera ( ) {
772
772
this . glplot . camera . view . recalcMatrix ( this . camera . view . lastT ( ) ) ;
773
- return getLayoutCamera ( this . glplot . camera , this . glplot . camera . _ortho ) ;
773
+ return getLayoutCamera ( this . glplot . camera ) ;
774
774
} ;
775
775
776
776
// set camera position with a set of plotly coords
0 commit comments