Преглед изворни кода

feat: 曲谱详情支持传入的zoom

TIANYONG пре 1 недеља
родитељ
комит
48fd418649
3 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      osmd-extended
  2. 1 1
      src/state.ts
  3. 1 1
      src/view/music-score/index.tsx

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 43dc4f3b6489924056a28b1c1c5a40771d150378
+Subproject commit a9750e2d69cdef62c365035e86f131586a25aa69

+ 1 - 1
src/state.ts

@@ -1530,7 +1530,7 @@ function xmlToTracks(xmlString: string) {
     if (textContent?.toLocaleLowerCase() === "common") {
       (window as any).HasCommonTrack = true;
     }
-    if (textContent != "COMMON" && textContent != "common" && textContent) {
+    if (textContent?.trim()?.toLocaleLowerCase() !== "common" && textContent) {
       arr.push(textContent)
     }
     return arr

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

@@ -176,7 +176,7 @@ export default defineComponent({
 			if (query.downPng === 'A4') {
 				osmd.EngravingRules.PageTopMargin = 5
 				osmd.setPageFormat('794x1100')
-				osmd.zoom = 0.3;
+				osmd.zoom = query.zoom || 0.3;
 			} else {
 				osmd.zoom = state.zoom;
 			}