fix: scope pos
This commit is contained in:
parent
62eb9ce598
commit
52e2b90eef
1 changed files with 1 additions and 2 deletions
|
|
@ -22,10 +22,9 @@ export function drawTimeScope(
|
||||||
|
|
||||||
const sliceWidth = (canvas.width * 1.0) / bufferSize;
|
const sliceWidth = (canvas.width * 1.0) / bufferSize;
|
||||||
let x = 0;
|
let x = 0;
|
||||||
|
|
||||||
for (let i = triggerIndex; i < bufferSize; i++) {
|
for (let i = triggerIndex; i < bufferSize; i++) {
|
||||||
const v = dataArray[i] + 1;
|
const v = dataArray[i] + 1;
|
||||||
const y = (1 - (scale * (v - 1) + pos)) * canvas.height;
|
const y = (pos - scale * (v - 1)) * canvas.height;
|
||||||
|
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
ctx.moveTo(x, y);
|
ctx.moveTo(x, y);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue