UNPKG

museaikit

Version:

A powerful music-focused AI toolkit

19 lines 763 B
import { BaseSVGVisualizer } from './base_svg_visualizer'; export class PianoRollSVGVisualizer extends BaseSVGVisualizer { constructor(sequence, svg, config = {}) { super(sequence, config); if (!(svg instanceof SVGSVGElement)) { throw new Error('This visualizer requires an <svg> element to display the visualization'); } this.svg = svg; this.parentElement = svg.parentElement; const size = this.getSize(); this.width = size.width; this.height = size.height; this.svg.style.width = `${this.width}px`; this.svg.style.height = `${this.height}px`; this.clear(); this.draw(); } } //# sourceMappingURL=piano_roll_svg_visualizer.js.map