Selaa lähdekoodia

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

TIANYONG 1 viikko sitten
vanhempi
commit
e6be6f69a2
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      src/state.ts
  2. 1 1
      src/view/music-score/index.tsx

+ 1 - 1
src/state.ts

@@ -1559,7 +1559,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;
 			}