diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-05-15 11:05:04 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-05-15 11:05:04 -0400 |
commit | fb922ed8ddad8e088f44886385772d55ea7971bb (patch) | |
tree | 634a338ef45629118b4a60682998357257d896e3 | |
parent | e1ba2357ad8afd460fd8a24bff3353b84488b7e8 (diff) |
fixed frame animation
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 3a55e805e..84a5bd733 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -128,7 +128,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P if (timecode !== undefined) { ((newBox instanceof Doc) ? [newBox] : newBox).map(doc => { doc["x-indexed"] = new List<number>(numberRange(timecode + 1).map(i => NumCast(doc.x))); - doc["x-indexed"] = new List<number>(numberRange(timecode + 1).map(i => NumCast(doc.y))); + doc["y-indexed"] = new List<number>(numberRange(timecode + 1).map(i => NumCast(doc.y))); doc.timecode = ComputedField.MakeFunction("collection.timecode", {}, { collection: this.props.Document }); doc.x = ComputedField.MakeInterpolated("x", "timecode"); doc.y = ComputedField.MakeInterpolated("y", "timecode"); @@ -1160,8 +1160,8 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P this.childDocs.map(doc => { const xindexed = Cast(doc['x-indexed'], listSpec("number"), null); const yindexed = Cast(doc['y-indexed'], listSpec("number"), null); - xindexed.length <= timecode && xindexed.push(NumCast(doc.x)); - yindexed.length <= timecode && yindexed.push(NumCast(doc.y)); + xindexed.length <= timecode + 1 && xindexed.push(NumCast(doc.x)); + yindexed.length <= timecode + 1 && yindexed.push(NumCast(doc.y)); }); this.childDocs.map(doc => doc.transition = "transform 1s"); this.props.Document.timecode = Math.max(0, timecode + 1); |