Remove comment
This commit is contained in:
parent
f7a6f2aa78
commit
d9d6b40689
|
@ -111,40 +111,4 @@ class MovingGraph extends Graph {
|
||||||
this.buffer[this.offset] = v;
|
this.buffer[this.offset] = v;
|
||||||
this.offset = (this.offset + 1) % this.buffer.length;
|
this.offset = (this.offset + 1) % this.buffer.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
_draw() {
|
|
||||||
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
||||||
|
|
||||||
this.ctx.beginPath();
|
|
||||||
this.ctx.moveTo(0, 0);
|
|
||||||
|
|
||||||
let step = this.canvas.width / (this.getLength() - 1);
|
|
||||||
|
|
||||||
if (this.smooth) {
|
|
||||||
for (let i = 0; i < this.getLength() - 2; i++) {
|
|
||||||
let xc = (this.getValue(i) + this.getValue(i + 1)) / 2;
|
|
||||||
this.ctx.quadraticCurveTo(
|
|
||||||
step * i,
|
|
||||||
this.getValue(i),
|
|
||||||
(step * i + step * (i + 1)) / 2,
|
|
||||||
xc
|
|
||||||
);
|
|
||||||
}
|
|
||||||
this.ctx.quadraticCurveTo(
|
|
||||||
step * (this.buffer.length - 1),
|
|
||||||
this.getValue(this.getLength() - 2),
|
|
||||||
step * this.buffer.length,
|
|
||||||
this.getValue(this.getLength() - 1)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
for (let i = 0; i < this.getLength(); i++) {
|
|
||||||
this.ctx.lineTo(step * i, this.getValue(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ctx.lineTo(this.canvas.width, 0);
|
|
||||||
this.ctx.fill();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user