Bug: Setting mouse controls to OnShape or AutoCAD resets to default (#4681)
* Bugfix: Setting mouse controls to OnShape resets to KittyCAD
Fixes #4639
* Revert "Bugfix: Setting mouse controls to OnShape resets to KittyCAD"
This reverts commit c95878d617
.
* Add cases for values without underscores
* Fix lint
* Pass yarn tsc and yarn fmt-check
This commit is contained in:
@ -32,8 +32,14 @@ export function mouseControlsToCameraSystem(
|
|||||||
mouseControl: MouseControlType | undefined
|
mouseControl: MouseControlType | undefined
|
||||||
): CameraSystem | undefined {
|
): CameraSystem | undefined {
|
||||||
switch (mouseControl) {
|
switch (mouseControl) {
|
||||||
|
// TODO: understand why the values come back without underscores and fix the root cause
|
||||||
|
// @ts-ignore: TS2678
|
||||||
|
case 'kittycad':
|
||||||
case 'kitty_cad':
|
case 'kitty_cad':
|
||||||
return 'KittyCAD'
|
return 'KittyCAD'
|
||||||
|
// TODO: understand why the values come back without underscores and fix the root cause
|
||||||
|
// @ts-ignore: TS2678
|
||||||
|
case 'onshape':
|
||||||
case 'on_shape':
|
case 'on_shape':
|
||||||
return 'OnShape'
|
return 'OnShape'
|
||||||
case 'trackpad_friendly':
|
case 'trackpad_friendly':
|
||||||
@ -44,6 +50,9 @@ export function mouseControlsToCameraSystem(
|
|||||||
return 'NX'
|
return 'NX'
|
||||||
case 'creo':
|
case 'creo':
|
||||||
return 'Creo'
|
return 'Creo'
|
||||||
|
// TODO: understand why the values come back without underscores and fix the root cause
|
||||||
|
// @ts-ignore: TS2678
|
||||||
|
case 'autocad':
|
||||||
case 'auto_cad':
|
case 'auto_cad':
|
||||||
return 'AutoCAD'
|
return 'AutoCAD'
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user