UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

38 lines (37 loc) 1.1 kB
export class StaveLineCount { config; log; partId; staveNumber; value; constructor(config, log, partId, staveNumber, value) { this.config = config; this.log = log; this.partId = partId; this.staveNumber = staveNumber; this.value = value; } static default(config, log, partId, staveNumber) { return new StaveLineCount(config, log, partId, staveNumber, 5); } static create(config, log, partId, musicXML) { return new StaveLineCount(config, log, partId, musicXML.staveDetails.getStaveNumber(), musicXML.staveDetails.getStaveLines()); } getPartId() { return this.partId; } getStaveNumber() { return this.staveNumber; } getValue() { return this.value; } isEqual(staveLineCount) { return (this.partId === staveLineCount.partId && this.staveNumber === staveLineCount.staveNumber && this.isEquivalent(staveLineCount)); } isEquivalent(staveLineCount) { return this.value === staveLineCount.value; } }