remove old comments

This commit is contained in:
Felix Roos 2022-06-05 23:59:44 +02:00
parent b3d2d3028c
commit 6d6784d429

View File

@ -42,7 +42,6 @@ Pattern.prototype.pianoroll = function ({
} }
const timeAxis = vertical ? h : w; const timeAxis = vertical ? h : w;
const valueAxis = vertical ? w : h; const valueAxis = vertical ? w : h;
// scale normalized value n to max pixels, flippable
let timeRange = vertical ? [timeAxis, 0] : [0, timeAxis]; // pixel range for time let timeRange = vertical ? [timeAxis, 0] : [0, timeAxis]; // pixel range for time
const timeExtent = to - from; // number of seconds that fit inside the canvas frame const timeExtent = to - from; // number of seconds that fit inside the canvas frame
const valueRange = vertical ? [0, valueAxis] : [valueAxis, 0]; // pixel range for values const valueRange = vertical ? [0, valueAxis] : [valueAxis, 0]; // pixel range for values
@ -52,7 +51,6 @@ Pattern.prototype.pianoroll = function ({
flipTime && timeRange.reverse(); flipTime && timeRange.reverse();
flipValues && valueRange.reverse(); flipValues && valueRange.reverse();
// duration to px (on timeAxis)
const playheadPosition = scale(-from / timeExtent, ...timeRange); const playheadPosition = scale(-from / timeExtent, ...timeRange);
this.draw( this.draw(
(ctx, events, t) => { (ctx, events, t) => {
@ -83,7 +81,6 @@ Pattern.prototype.pianoroll = function ({
...valueRange, ...valueRange,
); );
let margin = 0; let margin = 0;
// apply some pixel adjustments
const offset = scale(t / timeExtent, ...timeRange); const offset = scale(t / timeExtent, ...timeRange);
let coords; let coords;
if (vertical) { if (vertical) {
@ -93,7 +90,6 @@ Pattern.prototype.pianoroll = function ({
barThickness - 2, // width barThickness - 2, // width
durationPx - 2, // height durationPx - 2, // height
]; ];
// console.log(event.value, 'coords', coords);
} else { } else {
coords = [ coords = [
timePx - offset + margin + 1 - (flipTime ? durationPx : 0), // x timePx - offset + margin + 1 - (flipTime ? durationPx : 0), // x