diff options
author | andrewdkim <adkim414@gmail.com> | 2019-12-10 17:55:13 -0500 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-12-10 17:55:13 -0500 |
commit | a24f9da758415c60dbcb56b1cb488bec02d5b1a0 (patch) | |
tree | b1eb034758994e2c9ce5c29ee6b2c48b5d98ac57 /src/client/views/animationtimeline/Keyframe.tsx | |
parent | be753f6c952d8f1fc324d2c076095416b6d98a35 (diff) |
some changes
Diffstat (limited to 'src/client/views/animationtimeline/Keyframe.tsx')
-rw-r--r-- | src/client/views/animationtimeline/Keyframe.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/animationtimeline/Keyframe.tsx b/src/client/views/animationtimeline/Keyframe.tsx index e8b75eef4..c3e018112 100644 --- a/src/client/views/animationtimeline/Keyframe.tsx +++ b/src/client/views/animationtimeline/Keyframe.tsx @@ -88,6 +88,7 @@ export namespace KeyframeFunc { regiondata.fadeIn = 1000; regiondata.fadeOut = 1000; regiondata.functions = new List<Doc>(); + regiondata.hasData = false; return regiondata; }; @@ -114,7 +115,8 @@ export const RegionDataSchema = createSchema({ keyframes: listSpec(Doc), fadeIn: defaultSpec("number", 0), fadeOut: defaultSpec("number", 0), - functions: listSpec(Doc) + functions: listSpec(Doc), + hasData: defaultSpec("boolean", false) }); export type RegionData = makeInterface<[typeof RegionDataSchema]>; export const RegionData = makeInterface(RegionDataSchema); @@ -340,6 +342,7 @@ export class Keyframe extends React.Component<IProps> { if (offset > this.regiondata.fadeIn && offset < this.regiondata.duration - this.regiondata.fadeOut) { //make sure keyframe is not created inbetween fades and ends let position = this.regiondata.position; await this.makeKeyData(Math.round(position + offset)); + this.regiondata.hasData = true; this.props.changeCurrentBarX(KeyframeFunc.convertPixelTime(Math.round(position + offset), "mili", "pixel", this.props.tickSpacing, this.props.tickIncrement)); //first move the keyframe to the correct location and make a copy so the correct file gets coppied } } |