Переглянути джерело

docs: comments for VexFlowPatch files

still maybe missing some // VexFlowPatch: comments in more recently updated VexFlowPatch/*.js files
sschmid 4 роки тому
батько
коміт
75496eef13

+ 4 - 2
src/VexFlowPatch/readme.txt

@@ -38,5 +38,7 @@ tremolo.js (custom addition):
 Add extra_stroke_scale, y_spacing_scale
 
 Currently, we are using Vexflow 1.2.93, because of some formatter advantages
-compared to Vexflow 3.x versions.
-Because of that, we need to patch in a few fixes that came after 1.2.93.
+compared to Vexflow 3.x versions, see this issue:
+https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/issues/915
+
+Because of that, we need to patch in a few fixes that came after 1.2.93, as well as making custom additions for our needs.

+ 2 - 0
src/VexFlowPatch/src/staverepetition.js

@@ -84,6 +84,7 @@ export class Repetition extends StaveModifier {
       case Repetition.type.FINE:
         this.drawSymbolText(stave, x, 'Fine', false);
         break;
+      // VexFlowPatch: added TO_CODA type, handling
       case Repetition.type.TO_CODA:
         this.drawSymbolText(stave, x, 'To', true);
         break;
@@ -122,6 +123,7 @@ export class Repetition extends StaveModifier {
       // text_x = x + this.x + this.x_shift + stave.options.vertical_bar_width;
       // symbol_x = text_x + ctx.measureText(text).width + 12;
 
+      // VexFlowPatch: fix placement, like for DS_AL_CODA
       this.x_shift = -(text_x + ctx.measureText(text).width + 12 + stave.options.vertical_bar_width + 12);
       // TO_CODA and DS_AL_CODA draw in the next measure without this x_shift, not sure why not for other symbols.
       text_x = this.x + this.x_shift + stave.options.vertical_bar_width;