Skip to content

Commit

Permalink
fix danmaku heatmap width
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya authored Jul 19, 2024
1 parent ffbe458 commit 9748d54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/danmaku/src/heatmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default function heatmap(player: Player, danmaku: DanmakuContext, customP
const $wrap = document.createElement('div')
$wrap.style.cssText = `height: 8em;width:100%;pointer-events:none;padding-right:1em;`
$progress.insertBefore($wrap, $progress.firstChild)
const { offsetWidth: w, offsetHeight: h } = $wrap
const { offsetHeight: h } = $wrap
const w = parseFloat(getComputedStyle($progress).getPropertyValue('padding-right'))

const options = {
xMin: 0,
Expand Down

0 comments on commit 9748d54

Please sign in to comment.