From 6f58cfb6d290120f839da34e79471ec9826471ca Mon Sep 17 00:00:00 2001 From: Eleanor Eng Date: Fri, 7 Jun 2019 16:00:06 -0400 Subject: some stufff --- src/client/views/nodes/Timeline.tsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/Timeline.tsx b/src/client/views/nodes/Timeline.tsx index 7c4fef0b7..cc3945f0a 100644 --- a/src/client/views/nodes/Timeline.tsx +++ b/src/client/views/nodes/Timeline.tsx @@ -165,8 +165,7 @@ export class Timeline extends CollectionSubView(Document) { rightKf = TimeAndPosition(this._keyframes[i][rightMin]); } } else { - const keyf = Position(await singleKf.position); - const dif_X = NumCast(keyf.x); + isFrame = true; } } }); @@ -174,11 +173,22 @@ export class Timeline extends CollectionSubView(Document) { this.interpolate(oneDoc, leftKf, rightKf, this._currentBarX); } if (isFrame) { - console.log(isFrame); - const keyf = Position(await oneKf[i].position); - const dif_X = NumCast(keyf.X); - // oneDoc.x = oneKf[i].position.x; - // oneDoc.y = oneKf[i].y; + if (oneKf[i] !== undefined) { + // console.log(isFrame); + // //@ts-ignore + // oneDoc.x = this._keyframes[i].position.x; + // //@ts-ignore + // oneDoc.y = this._keyframes[i].position.y; + + //maybe???? + let pos: Position = Position(oneDoc); + let timeandpos = new Doc; + const newPos = new Doc; + this._keys.forEach(key => newPos[key] = pos[key]); + timeandpos.position = newPos; + timeandpos.time = this._currentBarX; + this._keyframes[i][this._currentBarX] = timeandpos; + } } isFrame = false; }); -- cgit v1.2.3-70-g09d2