| 
					
				 | 
			
			
				@@ -70,7 +70,6 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /** space needed for a dash for lyrics spacing, calculated once */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   private dashSpace: number; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   public beamsNeedUpdate: boolean = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  public isFirstZero: boolean = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   constructor(rules: EngravingRules) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     super(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -969,19 +968,10 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   protected calculateRehearsalMark(measure: SourceMeasure): void { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const rehearsalExpression: RehearsalExpression = measure.rehearsalExpression; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 修改 判断小节是否是从1开始 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (!this.isFirstZero && measure.MeasureNumber === 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.isFirstZero = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (!rehearsalExpression) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const firstMeasureNumber: number = this.graphicalMusicSheet.MeasureList[0][0].MeasureNumber; // 0 for pickup, 1 otherwise 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 修改 使用MeasureNumber这里循环状态可能会有问题,使用measureListIndex可能稍微好一点,目前看来XML中的顺序的对的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // const measureNumber: number =  Math.max(measure.MeasureNumber - firstMeasureNumber, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const measureNumber: number = Math.max(measure.measureListIndex + 1 - firstMeasureNumber, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const staffNumber: number = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    const vfStave: VF.Stave = (this.graphicalMusicSheet.MeasureList[measureNumber][staffNumber] as VexFlowMeasure)?.getVFStave(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const vfStave: VF.Stave = (measure.VerticalMeasureList?.[0] as VexFlowMeasure)?.getVFStave?.(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (!vfStave) { // potentially multi measure rest 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -990,10 +980,7 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (measure.IsSystemStartMeasure) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       xOffset += this.rules.RehearsalMarkXOffsetSystemStartMeasure; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // const section: VF.StaveSection = new VF.StaveSection(rehearsalExpression.label, vfStave.getX(), yOffset); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // (vfStave as any).modifiers.push(section); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const fontSize: number = this.rules.RehearsalMarkFontSize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // console.log(rehearsalExpression.label, yOffset); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 修改 存在方块数字时,如果有反复标记,修改标记Y轴位置偏移 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const modifiers: VF.StaveModifier[] = vfStave.getModifiers(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1002,15 +989,10 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       repetition.setShiftY(repetition.y_shift - 10) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 修改 小节数不对问题 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (this.isFirstZero) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      (vfStave as any).setSection(measure.MeasureNumberXML + 1 + '', yOffset, xOffset, fontSize); // fontSize is an extra argument from VexFlowPatch 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      (vfStave as any).setSection(rehearsalExpression.label, yOffset, xOffset, fontSize); // fontSize is an extra argument from VexFlowPatch 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ;(vfStave as any).setSection(rehearsalExpression.label, yOffset, xOffset, fontSize); // fontSize is an extra argument from VexFlowPatch 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //修改 存在方块数字时,如果当前行有文字,修改文字Y轴位置偏移 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if (this.graphicalMusicSheet.MeasureList[measureNumber][staffNumber]?.ParentStaffLine.AbstractExpressions){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if ((measure.VerticalMeasureList?.[0] as VexFlowMeasure)?.ParentStaffLine.AbstractExpressions){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const staveSection: any = modifiers.find(n => n.getCategory().toLocaleLowerCase() === 'stavesection'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       for(let gue of measure?.VerticalMeasureList?.[0]?.ParentStaffLine?.AbstractExpressions || []){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (gue instanceof GraphicalUnknownExpression ){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1023,7 +1005,6 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   /** 
			 |