sschmidTU on develop
generateImages: replace console⦠(compare)
sschmidTU on develop
osmd.load: add optional tempTit⦠(compare)
sschmidTU on vexflow4
update to vexflow 4.0.3 (#1171) (compare)
@sschmidTU for example some variables
// protected zoomUpdated: boolean = false;
// protected needBackendUpdate: boolean = false;
// protected rules!: EngravingRules;
// protected sheet?: MusicSheet;
// protected graphic?: GraphicalMusicSheet;
// protected drawer!: VexFlowMusicSheetDrawer;
// protected drawingParameters!: DrawingParameters;
and the private function reset
I create a class which extends the OpenSheetMusicDisplay.ts
and need override some function and needs call these variable. It's wonderful if the lib change the private
to protected
for extend
(sheet as any).member
to access them.
I think I have seen a method with a promising name, but I ended up doing something like this:
let graphicalMeasure = osmdInstance.graphic.getGraphicalMeasureFromSourceMeasureAndIndex(
measure,
0
);
let rect = document.createElementNS(SVGNS, 'rect');
if (graphicalMeasure && graphicalMeasure.stave) {
['x', 'y', 'width', 'height'].forEach(prop => {
rect.setAttribute(prop, graphicalMeasure.stave[prop]);
}
svg.appendChild(rect);
and styling the rect appropriately.