mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
playback position covered up the waveform
This commit is contained in:
parent
f5520f45ef
commit
d6794955a4
|
@ -1670,12 +1670,14 @@ var pbar = (function () {
|
||||||
pctx.strokeStyle = 'rgba(24,56,0,0.4)';
|
pctx.strokeStyle = 'rgba(24,56,0,0.4)';
|
||||||
pctx.font = '1em sans-serif';
|
pctx.font = '1em sans-serif';
|
||||||
|
|
||||||
var m = pctx.measureText.bind(pctx),
|
var t1 = s2ms(adur),
|
||||||
t1 = s2ms(adur),
|
|
||||||
t2 = s2ms(apos),
|
t2 = s2ms(apos),
|
||||||
|
m1 = pctx.measureText(t1),
|
||||||
|
m1b = pctx.measureText(t1 + ":88"),
|
||||||
|
m2 = pctx.measureText(t2),
|
||||||
yt = pc.h / 3 * 2.1,
|
yt = pc.h / 3 * 2.1,
|
||||||
xt1 = pc.w - (m(t1).width + 12),
|
xt1 = pc.w - (m1.width + 12),
|
||||||
xt2 = x < pc.w / 2 ? (x + 12) : (Math.min(pc.w - m(t1 + ":88").width, x - 12) - m(t2).width);
|
xt2 = x < m1.width * 1.4 ? (x + 12) : (Math.min(pc.w - m1b.width, x - 12) - m2.width);
|
||||||
|
|
||||||
pctx.strokeText(t1, xt1 + 1, yt + 1);
|
pctx.strokeText(t1, xt1 + 1, yt + 1);
|
||||||
pctx.strokeText(t2, xt2 + 1, yt + 1);
|
pctx.strokeText(t2, xt2 + 1, yt + 1);
|
||||||
|
|
Loading…
Reference in a new issue