File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -559,11 +559,13 @@ proto.destroy = function() {
559559// for reset camera button in mode bar
560560proto . setCameraToDefault = function setCameraToDefault ( ) {
561561 // as in Gl3d.layoutAttributes
562- this . glplot . camera . lookAt (
562+ var lookAtInput = [
563563 [ 1.25 , 1.25 , 1.25 ] ,
564564 [ 0 , 0 , 0 ] ,
565565 [ 0 , 0 , 1 ]
566- ) ;
566+ ] ;
567+ this . glplot . camera . lookAt . apply ( this , lookAtInput ) ;
568+ this . graphDiv . emit ( 'plotly_relayout' , lookAtInput ) ;
567569} ;
568570
569571// get camera position in plotly coords from 'orbit-camera' coords
@@ -586,11 +588,13 @@ proto.setCamera = function setCamera(cameraData) {
586588 var up = cameraData . up ;
587589 var center = cameraData . center ;
588590 var eye = cameraData . eye ;
589- this . glplot . camera . lookAt (
591+ var lookAtInput = [
590592 [ eye . x , eye . y , eye . z ] ,
591593 [ center . x , center . y , center . z ] ,
592594 [ up . x , up . y , up . z ]
593- ) ;
595+ ] ;
596+ this . glplot . camera . lookAt . apply ( this , lookAtInput ) ;
597+ this . graphDiv . emit ( 'plotly_relayout' , lookAtInput ) ;
594598} ;
595599
596600// save camera to user layout (i.e. gd.layout)
You can’t perform that action at this time.
0 commit comments