File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -348,10 +348,14 @@ function handleCamera3d(gd, ev) {
348
348
var scene = fullLayout [ sceneId ] . _scene ;
349
349
350
350
if ( attr === 'resetDefault' || attr === 'resetLastSave' ) {
351
- aobj [ key ] = Lib . extendDeep ( { } , scene . viewInitial ) ;
352
-
353
- aobj [ key ] . projection = {
354
- type : ( scene . camera . _ortho ) ? 'orthographic' : 'perspective'
351
+ aobj [ key ] = {
352
+ 'up' : scene . viewInitial . up ,
353
+ 'eye' : scene . viewInitial . eye ,
354
+ 'center' : scene . viewInitial . center ,
355
+ 'projection' : {
356
+ type : ( scene . camera . _ortho ) ?
357
+ 'orthographic' : 'perspective'
358
+ }
355
359
} ;
356
360
}
357
361
Original file line number Diff line number Diff line change @@ -71,19 +71,19 @@ exports.plot = function plotGl3d(gd) {
71
71
if ( ! scene . viewInitial ) {
72
72
scene . viewInitial = {
73
73
up : {
74
- x : sceneLayout . camera . up . x ,
75
- y : sceneLayout . camera . up . y ,
76
- z : sceneLayout . camera . up . z
74
+ x : camera . up . x ,
75
+ y : camera . up . y ,
76
+ z : camera . up . z
77
77
} ,
78
78
eye : {
79
- x : sceneLayout . camera . eye . x ,
80
- y : sceneLayout . camera . eye . y ,
81
- z : sceneLayout . camera . eye . z
79
+ x : camera . eye . x ,
80
+ y : camera . eye . y ,
81
+ z : camera . eye . z
82
82
} ,
83
83
center : {
84
- x : sceneLayout . camera . center . x ,
85
- y : sceneLayout . camera . center . y ,
86
- z : sceneLayout . camera . center . z
84
+ x : camera . center . x ,
85
+ y : camera . center . y ,
86
+ z : camera . center . z
87
87
}
88
88
} ;
89
89
}
You can’t perform that action at this time.
0 commit comments