wave-roll
Version:
JavaScript Library for Comparative MIDI Piano-Roll Visualization
24 lines • 1.03 kB
TypeScript
/**
* Loop marker (A/B) factory shared between the seek-bar and the standalone
* time-display components. Injects the common CSS only once and returns a
* styled <div> element that contains the label plus its vertical stem.
*
* The stem height can be customised on a per-marker basis via the
* `stemHeight` parameter. This is implemented with a CSS custom property so we
* avoid generating separate selector rules for each marker instance.
*/
export interface MarkerOptions {
id: string;
label: string;
color: string;
/** Height (in px) of the vertical stem that reaches down into the bar. */
stemHeight?: number;
}
/**
* Create a loop marker element (label + coloured background + vertical stem).
*
* The returned element is hidden (`display:none`) by default - callers should
* toggle it to `block` once the corresponding loop point is set.
*/
export declare function createMarker(label: string, color: string, id: string, stemHeight?: number): HTMLElement;
//# sourceMappingURL=marker.d.ts.map