Selaa lähdekoodia

Merge branch 'gyt-feature-tianyong' into gyt-test

TIANYONG 1 vuosi sitten
vanhempi
commit
d5d9844440

+ 1 - 0
osmd-extended/src/MusicalScore/Graphical/MusicSheetCalculator.ts

@@ -741,6 +741,7 @@ export abstract class MusicSheetCalculator {
 
             const gue: GraphicalUnknownExpression = new GraphicalUnknownExpression(
                 staffLine, graphLabel, placement, measures[staffIndex]?.parentSourceMeasure, multiExpression);
+                console.log(gue)
             //    multiExpression); // TODO would be nice to hand over and save reference to original expression,
             //                         but MultiExpression is not an AbstractExpression.
             // staffline 里面最后的文字重叠问题,向后偏移

+ 1 - 1
osmd-extended/src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetDrawer.ts

@@ -31,7 +31,7 @@ import { GraphicalMusicSheet } from "../GraphicalMusicSheet";
 import { GraphicalUnknownExpression } from "../GraphicalUnknownExpression";
 import { VexFlowPedal } from "./VexFlowPedal";
 import { VexflowVibratoBracket } from "./VexflowVibratoBracket";
-import { Fraction } from "../../../Common";
+// import { Fraction } from "../../../Common";
 
 /**
  * This is a global constant which denotes the height in pixels of the space between two lines of the stave

+ 1 - 1
osmd-extended/src/VexFlowPatch/src/stavenote.js

@@ -416,7 +416,7 @@ export class StaveNote extends StemmableNote {
   constructor(noteStruct) {
     super(noteStruct);
     this.setAttribute('type', 'StaveNote');
-    console.log('stavenote.js~')
+    // console.log('stavenote.js~')
     this.keys = noteStruct.keys;
     this.clef = noteStruct.clef;
     this.octave_shift = noteStruct.octave_shift;

+ 11 - 1
src/pages/detail/helpers.ts

@@ -236,12 +236,22 @@ export const getAllNodes = (osmd: any) => {
       if (state.isCombineRender) {
         for (let index = 0; index < iterator.currentVoiceEntries.length; index++) {
           const element = iterator.currentVoiceEntries[index];
+          /** 
+           * 曲谱:合奏2-14,1752154261147389954,跳过倚音
+           */
+          if (element.isGrace) {
+            if (minIndex == index && minIndex == 0) {
+              minIndex = iterator.currentVoiceEntries.length > 1 ? 1 : 0
+            }
+            continue
+          }
           if (element.notes[0].length.realValue < elRealValue) {
             minIndex = index
           }
           elRealValue = element.notes[0].length.realValue
         }
       }
+      
       let voiceEntries = iterator.currentVoiceEntries?.[0] ? [iterator.currentVoiceEntries?.[0]] : []
       const voiceEntries2 = iterator.currentVoiceEntries?.[1]
       if (state.isCombineRender) {
@@ -513,7 +523,7 @@ export const getAllNodes = (osmd: any) => {
             NoteToGraphicalNoteObjectId: note.NoteToGraphicalNoteObjectId,
             cursorBox,
             skipNextNote,
-            measureNumberPrinted,
+            measureNumberPrinted, // 当前小节数(从1开始)
             difftime,
             octaveOffset: activeVerticalMeasureList[0]?.octaveOffset,
             frequency: note.pitch?.frequency,