@@ -255,7 +255,7 @@ function initializeGLPlot(scene, camera, pixelRatio, canvas, gl) {
255255 if ( scene . fullSceneLayout . dragmode === false ) return ;
256256
257257 var update = { } ;
258- update [ scene . id + '.camera' ] = getLayoutCamera ( scene . camera , scene . camera . _ortho ) ;
258+ update [ scene . id + '.camera' ] = getLayoutCamera ( scene . camera ) ;
259259 scene . saveCamera ( gd . layout ) ;
260260 scene . graphDiv . emit ( 'plotly_relayout' , update ) ;
261261 } ;
@@ -758,19 +758,19 @@ function getOrbitCamera(camera) {
758758
759759// getLayoutCamera :: orbit_camera_coords -> plotly_coords
760760// inverse of getOrbitCamera
761- function getLayoutCamera ( camera , isOrtho ) {
761+ function getLayoutCamera ( camera ) {
762762 return {
763763 up : { x : camera . up [ 0 ] , y : camera . up [ 1 ] , z : camera . up [ 2 ] } ,
764764 center : { x : camera . center [ 0 ] , y : camera . center [ 1 ] , z : camera . center [ 2 ] } ,
765765 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' }
767767 } ;
768768}
769769
770770// get camera position in plotly coords from 'orbit-camera' coords
771771proto . getCamera = function getCamera ( ) {
772772 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 ) ;
774774} ;
775775
776776// set camera position with a set of plotly coords
0 commit comments