Browse Source

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

TIANYONG 1 week ago
parent
commit
e6be6f69a2
2 changed files with 2 additions and 2 deletions
  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;
 			}