Explorar el Código

Merge branch 'feature-tianyong-newVersion' into ktyq-test-new

TIANYONG hace 10 meses
padre
commit
4bae1d0719
Se han modificado 2 ficheros con 6 adiciones y 1 borrados
  1. 4 0
      src/state.ts
  2. 2 1
      src/view/music-score/index.tsx

+ 4 - 0
src/state.ts

@@ -1844,6 +1844,10 @@ export const fillWordColor = () => {
     const onlyOneLyric = currentNote.measures?.every((item: any) => item?.formatLyricsEntries?.length <= 1);
     if ((index === currentNote.repeatIdx && currentNote.repeatIdx + 1 == lyricIndex) || (currentNote.repeatIdx != index && !onlyOneLyric && currentNote.repeatIdx + 1 == lyricIndex) || (currentNote.repeatIdx > 0 && currentNote.formatLyricsEntries?.length === 1 && onlyOneLyric)) {
       lyric?.classList.add('lyricActive')
+    } 
+    // bug: #11189,兼容处理需要唱4遍,但是只打了2遍歌词的情况,1、3唱一样的歌词,2、4唱一样的歌词
+    if ( currentNote.formatLyricsEntries.length == 2 && currentNote.repeatIdx >= 2 && index === (currentNote.repeatIdx - 2) ) {
+      lyric?.classList.add('lyricActive')
     }
     // if ((index === currentNote.repeatIdx && currentNote.repeatIdx + 1 == lyricIndex)) {
     //   lyric?.classList.add('lyricActive')

+ 2 - 1
src/view/music-score/index.tsx

@@ -128,7 +128,8 @@ export default defineComponent({
 				osmd.EngravingRules.PageBottomMargin = 0;
 			} else {
 				// osmd.EngravingRules.PageTopMargin = state.isEvaluatReport ? 7 : 3; // 顶部间距
-				osmd.EngravingRules.PageTopMargin = state.isPreView ? 1 : 3;
+				// osmd.EngravingRules.PageTopMargin = state.isPreView ? 1 : 3;
+				osmd.EngravingRules.PageTopMargin = (state.isPreView && state.musicRenderType === EnumMusicRenderType.staff) ? 1 : state.isPreView ? 2 : 3;
 				osmd.EngravingRules.PageTopMarginNarrow = 3;
 				osmd.EngravingRules.PageLeftMargin = 3.6;
 				osmd.EngravingRules.PageRightMargin = 3;