File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 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) {
348348 var scene = fullLayout [ sceneId ] . _scene ;
349349
350350 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 ;
352355 }
353356 else if ( attr === 'resetLastSave' ) {
354357 aobj [ key ] = Lib . extendDeep ( { } , scene . cameraInitial ) ;
Original file line number Diff line number Diff line change @@ -600,7 +600,10 @@ exports.doCamera = function(gd) {
600600 var sceneLayout = fullLayout [ sceneIds [ i ] ] ;
601601 var scene = sceneLayout . _scene ;
602602
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 ) ;
604607 }
605608} ;
606609
You can’t perform that action at this time.
0 commit comments