File tree 2 files changed +8
-2
lines changed 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,10 @@ function handleCamera3d(gd, ev) {
348
348
var scene = fullLayout [ sceneId ] . _scene ;
349
349
350
350
if ( attr === 'resetDefault' ) {
351
- aobj [ key ] = null ;
351
+ aobj [ key ] = Lib . extendDeep ( { } , scene . cameraInitial ) ;
352
+ aobj [ key ] . up = null ;
353
+ aobj [ key ] . eye = null ;
354
+ aobj [ key ] . center = null ;
352
355
}
353
356
else if ( attr === 'resetLastSave' ) {
354
357
aobj [ key ] = Lib . extendDeep ( { } , scene . cameraInitial ) ;
Original file line number Diff line number Diff line change @@ -600,7 +600,10 @@ exports.doCamera = function(gd) {
600
600
var sceneLayout = fullLayout [ sceneIds [ i ] ] ;
601
601
var scene = sceneLayout . _scene ;
602
602
603
- scene . setCamera ( sceneLayout . camera ) ;
603
+ var cameraData = sceneLayout . camera ;
604
+ var isOrtho = ! ! ( cameraData && cameraData . projection && cameraData . projection . type === 'orthographic' ) ;
605
+
606
+ scene . setCamera ( cameraData , isOrtho ) ;
604
607
}
605
608
} ;
606
609
You can’t perform that action at this time.
0 commit comments