File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1058,11 +1058,11 @@ export function addCommands(
1058
1058
1059
1059
commands . addCommand ( CommandIDs . updateCameraSettings , {
1060
1060
label : ( ) => {
1061
- const isOn =
1061
+ const isPerspectiveOn =
1062
1062
tracker . currentWidget ?. content ?. cameraSettings ?. type === 'Perspective' ;
1063
- return isOn
1064
- ? trans . __ ( 'Perspective projection is on ' )
1065
- : trans . __ ( 'Orthographic projection is on ' ) ;
1063
+ return isPerspectiveOn
1064
+ ? trans . __ ( 'Switch to orthographic projection ' )
1065
+ : trans . __ ( 'Switch to perspective projection ' ) ;
1066
1066
} ,
1067
1067
isEnabled : ( ) => Boolean ( tracker . currentWidget ) ,
1068
1068
icon : videoSolidIcon ,
@@ -1077,9 +1077,15 @@ export function addCommands(
1077
1077
} else {
1078
1078
const currentSettings : CameraSettings = current . content . cameraSettings ;
1079
1079
if ( currentSettings . type === 'Perspective' ) {
1080
- current . content . cameraSettings . type = 'Orthographic' ;
1080
+ current . content . cameraSettings = {
1081
+ ...current . content . cameraSettings ,
1082
+ type : 'Orthographic'
1083
+ } ;
1081
1084
} else {
1082
- current . content . cameraSettings . type = 'Perspective' ;
1085
+ current . content . cameraSettings = {
1086
+ ...current . content . cameraSettings ,
1087
+ type : 'Perspective'
1088
+ } ;
1083
1089
}
1084
1090
}
1085
1091
commands . notifyCommandChanged ( CommandIDs . updateCameraSettings ) ;
You can’t perform that action at this time.
0 commit comments