From 26ee241c2492d0201abd0a196232e42258b6fd3a Mon Sep 17 00:00:00 2001 From: Sophie Zhang Date: Thu, 14 Mar 2024 09:50:09 -0400 Subject: small error handling presEaseFunc --- src/client/views/nodes/trails/PresBox.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 115e124df..ed676dff5 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -180,7 +180,7 @@ export class PresBox extends ViewBoxBaseComponent() { @computed get currCPoints() { console.log('getting curr c points'); - let strPoints = StrCast(this.activeItem.presEaseFunc) ?? 'ease'; + let strPoints = this.activeItem.presEaseFunc ? StrCast(this.activeItem.presEaseFunc) : 'ease'; if (!strPoints.startsWith('cubic')) { switch (StrCast(this.activeItem.presEaseFunc)) { case 'linear': @@ -198,6 +198,8 @@ export class PresBox extends ViewBoxBaseComponent() { case 'ease-in-out': strPoints = 'cubic-bezier(0.42, 0, 0.58, 1.0)'; break; + default: + strPoints = 'cubic-bezier(0.25, 0.1, 0.25, 1.0)'; } } console.log('str points', strPoints); -- cgit v1.2.3-70-g09d2