Skip to content

Commit

Permalink
Fix: timeline height
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Mar 31, 2024
1 parent 920514e commit 1d0b787
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/plugins/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOpti
}

if (this.options.insertPosition) {
;(container.firstElementChild || container).insertAdjacentElement(
; (container.firstElementChild || container).insertAdjacentElement(
this.options.insertPosition,
this.timelineWrapper,
)
Expand All @@ -104,7 +104,10 @@ class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOpti
}

private initTimelineWrapper(): HTMLElement {
return createElement('div', { part: 'timeline-wrapper', style: { pointerEvents: 'none' } })
return createElement('div', {
part: 'timeline-wrapper',
style: { pointerEvents: 'none', height: `${this.options.height}px` },
})
}

// Return how many seconds should be between each notch
Expand Down Expand Up @@ -161,15 +164,15 @@ class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOpti
whiteSpace: 'nowrap',
...(isTop
? {
position: 'absolute',
top: '0',
left: '0',
right: '0',
zIndex: '2',
}
position: 'absolute',
top: '0',
left: '0',
right: '0',
zIndex: '2',
}
: {
position: 'relative',
}),
position: 'relative',
}),
},
})

Expand Down

0 comments on commit 1d0b787

Please sign in to comment.