Browse Source

feat: 1线谱,符杆都朝上

TIANYONG 1 year ago
parent
commit
99b1e72169

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

@@ -716,7 +716,7 @@ export class VexFlowConverter {
             // 所有叠加音符都超过第三线才朝下
             const stemDirectionNote = (window as any).GYM?.stemDirectionNote
             if(!stemDirectionNote && keyLines.length === keys.length){
-                console.log('👀~111')
+                // console.log('👀~111')
                 vfnote.setStemDirection(-1)
             }
         }

+ 4 - 0
osmd-extended/src/MusicalScore/Graphical/VexFlow/VexFlowStaffEntry.ts

@@ -39,6 +39,10 @@ export class VexFlowStaffEntry extends GraphicalStaffEntry {
                     gve.vfStaveNote.setStemDirection(VF.Stem.UP)
                     gve.parentVoiceEntry.StemDirection = StemDirectionType.Up
                 } 
+                // 1线谱 符杆都朝上
+                if (stave && (stave as any).getLines && (stave as any).getLines() === 1) {
+                    ;(window as any).DYMusicalOrientation = 0
+                }
                 if (!gve.vfStaveNote.preFormatted) {
                     continue;
                 }