File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -559,11 +559,13 @@ proto.destroy = function() {
559
559
// for reset camera button in mode bar
560
560
proto . setCameraToDefault = function setCameraToDefault ( ) {
561
561
// as in Gl3d.layoutAttributes
562
- this . glplot . camera . lookAt (
562
+ var lookAtInput = [
563
563
[ 1.25 , 1.25 , 1.25 ] ,
564
564
[ 0 , 0 , 0 ] ,
565
565
[ 0 , 0 , 1 ]
566
- ) ;
566
+ ] ;
567
+ this . glplot . camera . lookAt . apply ( this , lookAtInput ) ;
568
+ gd . emit ( 'plotly_relayout' , lookAtInput ) ;
567
569
} ;
568
570
569
571
// get camera position in plotly coords from 'orbit-camera' coords
@@ -586,11 +588,13 @@ proto.setCamera = function setCamera(cameraData) {
586
588
var up = cameraData . up ;
587
589
var center = cameraData . center ;
588
590
var eye = cameraData . eye ;
589
- this . glplot . camera . lookAt (
591
+ var lookAtInput = [
590
592
[ eye . x , eye . y , eye . z ] ,
591
593
[ center . x , center . y , center . z ] ,
592
594
[ up . x , up . y , up . z ]
593
- ) ;
595
+ ] ;
596
+ this . glplot . camera . lookAt . apply ( this , lookAtInput ) ;
597
+ gd . emit ( 'plotly_relayout' , lookAtInput ) ;
594
598
} ;
595
599
596
600
// save camera to user layout (i.e. gd.layout)
You can’t perform that action at this time.
0 commit comments