aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2024-03-14 09:50:09 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2024-03-14 09:50:09 -0400
commit26ee241c2492d0201abd0a196232e42258b6fd3a (patch)
tree55598ea623a0108fd18bf1dc2baf322feb2de12e /src
parentd9570eb985afc20a440277c1debea89707ab52a1 (diff)
small error handling presEaseFunc
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx4
1 files changed, 3 insertions, 1 deletions
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<FieldViewProps>() {
@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<FieldViewProps>() {
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);