aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/animationtimeline
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-07 13:14:30 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-07 13:14:30 -0500
commit16ea6fac3dc786b80c934284a6b6079dd60da084 (patch)
treeefc2672c0101b737fa051a86e2a428a8df19da57 /src/client/views/animationtimeline
parent6c9a18d8ec385255aa0175c23aed9f9a006ad060 (diff)
parent3e7cc70f7588c738c34de1d087e1d53b9410d9fe (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into script_documents
Diffstat (limited to 'src/client/views/animationtimeline')
-rw-r--r--src/client/views/animationtimeline/Timeline.tsx2
-rw-r--r--src/client/views/animationtimeline/Track.tsx5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/animationtimeline/Timeline.tsx b/src/client/views/animationtimeline/Timeline.tsx
index 017623120..43f15a33f 100644
--- a/src/client/views/animationtimeline/Timeline.tsx
+++ b/src/client/views/animationtimeline/Timeline.tsx
@@ -11,8 +11,6 @@ import { KeyframeFunc } from "./Keyframe";
import "./Timeline.scss";
import { TimelineOverview } from "./TimelineOverview";
import { Track } from "./Track";
-import { utils } from "mocha";
-import { Util } from "../../../../deploy/assets/pdf.worker";
import clamp from "../../util/clamp";
/**
diff --git a/src/client/views/animationtimeline/Track.tsx b/src/client/views/animationtimeline/Track.tsx
index fc96c320a..4987006e7 100644
--- a/src/client/views/animationtimeline/Track.tsx
+++ b/src/client/views/animationtimeline/Track.tsx
@@ -31,13 +31,14 @@ export class Track extends React.Component<IProps> {
@observable private _autoKfReaction: any;
@observable private _newKeyframe: boolean = false;
private readonly MAX_TITLE_HEIGHT = 75;
- private _trackHeight = 0;
+ @observable private _trackHeight = 0;
private primitiveWhitelist = [
"x",
"y",
"_width",
"_height",
"opacity",
+ "_scrollTop"
];
private objectWhitelist = [
"data"
@@ -51,7 +52,7 @@ export class Track extends React.Component<IProps> {
if (!regions) this.props.node.regions = new List<Doc>(); //if there is no region, then create new doc to store stuff
//these two lines are exactly same from timeline.tsx
const relativeHeight = window.innerHeight / 20;
- this._trackHeight = relativeHeight < this.MAX_TITLE_HEIGHT ? relativeHeight : this.MAX_TITLE_HEIGHT; //for responsiveness
+ runInAction(() => this._trackHeight = relativeHeight < this.MAX_TITLE_HEIGHT ? relativeHeight : this.MAX_TITLE_HEIGHT); //for responsiveness
this._timelineVisibleReaction = this.timelineVisibleReaction();
this._currentBarXReaction = this.currentBarXReaction();
if (DocListCast(this.props.node.regions).length === 0) this.createRegion(this.time);