diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-09-28 17:00:47 -0400 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-09-28 17:00:47 -0400 |
| commit | 8c018a7a686a752ef1b86b852ec2d298792aa354 (patch) | |
| tree | d596e88df34a9174767565caa55d918c8ec600e4 /src/client/views/animationtimeline/Track.tsx | |
| parent | 19178bad14cda27aa36932f500ec06d684b843ef (diff) | |
toggle
Diffstat (limited to 'src/client/views/animationtimeline/Track.tsx')
| -rw-r--r-- | src/client/views/animationtimeline/Track.tsx | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/client/views/animationtimeline/Track.tsx b/src/client/views/animationtimeline/Track.tsx index 274b215d9..3ec410216 100644 --- a/src/client/views/animationtimeline/Track.tsx +++ b/src/client/views/animationtimeline/Track.tsx @@ -32,18 +32,24 @@ export class Track extends React.Component<IProps> { @observable private _onKeyframe: (Doc | undefined) = undefined; @observable private _onRegionData: (Doc | undefined) = undefined; @observable private _storedState: (Doc | undefined) = undefined; - - @computed - private get regions() { - return Cast(this.props.node.regions, listSpec(Doc)) as List<Doc>; - } + @observable private filterList = [ + "regions", + "cursors", + "hidden", + "nativeHeight", + "nativeWidth", + "schemaColumns", + "baseLayout", + "backgroundLayout", + "layout", + ]; + + @computed private get regions() { return Cast(this.props.node.regions, listSpec(Doc)) as List<Doc>;} componentWillMount() { - if (!this.props.node.regions) { - this.props.node.regions = new List<Doc>(); - } - - + runInAction(() => { + if (!this.props.node.regions) this.props.node.regions = new List<Doc>(); + }); } componentDidMount() { @@ -54,11 +60,11 @@ export class Track extends React.Component<IProps> { this.props.node.hidden = false; this.props.node.opacity = 1; }); - } componentWillUnmount() { runInAction(() => { + //disposing reactions if (this._currentBarXReaction) this._currentBarXReaction(); if (this._timelineVisibleReaction) this._timelineVisibleReaction(); }); @@ -166,17 +172,7 @@ export class Track extends React.Component<IProps> { }); } - private filterList = [ - "regions", - "cursors", - "hidden", - "nativeHeight", - "nativeWidth", - "schemaColumns", - "baseLayout", - "backgroundLayout", - "layout", - ]; + @action private filterKeys = (keys: string[]): string[] => { |
