aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackedTimeline.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2021-10-23 21:36:30 -0400
committermehekj <mehek.jethani@gmail.com>2021-10-23 21:36:30 -0400
commit3d76222b8cd41423bcdd7a91e4aee2826f329d9f (patch)
treed5be2838bb8a85dbbeff54048025245acf766162 /src/client/views/collections/CollectionStackedTimeline.tsx
parent353e72feb29d3549dcf7ec7875241ddb7a9a99d9 (diff)
audiobox UI update
Diffstat (limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')
-rw-r--r--src/client/views/collections/CollectionStackedTimeline.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 5c02611bb..c79d21418 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -153,7 +153,6 @@ export class CollectionStackedTimeline extends CollectionSubView<
@action
public setZoom(zoom: number) {
this._zoomFactor = zoom;
- // console.log(this._timeline?.scrollWidth);
}
anchorStart = (anchor: Doc) => NumCast(anchor._timecodeToShow, NumCast(anchor[this.props.startTag]));
@@ -534,8 +533,9 @@ export class CollectionStackedTimeline extends CollectionSubView<
);
}
@computed get renderAudioWaveform() {
+ console.log(this.props.mediaPath)
return !this.props.mediaPath ? null : (
- <div className="collectionStackedTimeline-waveform" style={{ width: `${this.zoomFactor * 100}%`, overflowX: "scroll" }}>
+ <div className="collectionStackedTimeline-waveform">
<AudioWaveform
rawDuration={this.props.rawDuration}
duration={this.clipDuration}
@@ -580,7 +580,7 @@ export class CollectionStackedTimeline extends CollectionSubView<
ref={(timeline: HTMLDivElement | null) => (this._timeline = timeline)}
onClick={(e) => this.isContentActive() && StopEvent(e)}
onPointerDown={(e) => this.isContentActive() && this.onPointerDownTimeline(e)}
- onPointerEnter={(e) => { console.log("scroll"); e.preventDefault(); e.stopPropagation(); }}
+ style={{ height: this.props.PanelHeight(), width: this.props.PanelWidth() }}
>
{drawAnchors.map((d) => {
@@ -591,10 +591,10 @@ export class CollectionStackedTimeline extends CollectionSubView<
);
if (end < this.clipStart || start > this.clipEnd) return (null);
const left = Math.max((start - this.clipStart) / this.clipDuration * timelineContentWidth, 0);
- const top = (d.level / maxLevel) * this.timelineContentHeight();
+ const top = (d.level / maxLevel) * this.props.PanelHeight();
const timespan = Math.max(0, end - this.clipStart) - Math.max(0, start - this.clipStart);
const width = (timespan / this.clipDuration) * timelineContentWidth;
- const height = this.timelineContentHeight() / maxLevel;
+ const height = this.props.PanelHeight() / maxLevel;
return this.props.Document.hideAnchors ? null : (
<div
className={"collectionStackedTimeline-marker-timeline"}