liushengqiang 2 년 전
부모
커밋
c13efeee3e
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      osmd-extended/src/VexFlowPatch/src/stave.js

+ 7 - 7
osmd-extended/src/VexFlowPatch/src/stave.js

@@ -102,12 +102,7 @@ export class Stave extends Element {
   resetLines() {
   resetLines() {
     this.options.line_config = [];
     this.options.line_config = [];
     for (let i = 0; i < this.options.num_lines; i++) {
     for (let i = 0; i < this.options.num_lines; i++) {
-      // 简谱
-      if (this.options.DYMusicScoreType === 'jianpu') {
-        this.options.line_config.push({ visible: false });
-      } else {
-        this.options.line_config.push({ visible: true });
-      }
+      this.options.line_config.push({ visible: true });
     }
     }
     this.height = (this.options.num_lines + this.options.space_above_staff_ln) *
     this.height = (this.options.num_lines + this.options.space_above_staff_ln) *
       this.options.spacing_between_lines_px;
       this.options.spacing_between_lines_px;
@@ -683,7 +678,12 @@ export class Stave extends Element {
     for (let line = 0; line < num_lines; line++) {
     for (let line = 0; line < num_lines; line++) {
       y = this.getYForLine(line);
       y = this.getYForLine(line);
 
 
-      this.applyStyle();
+      // 简谱
+      if (this.options.DYMusicScoreType === 'jianpu') {
+        this.applyStyle(this.context, {strokeStyle: "transparent"});
+      } else {
+        this.applyStyle();
+      }
       if (this.options.line_config[line].visible) {
       if (this.options.line_config[line].visible) {
         this.context.beginPath();
         this.context.beginPath();
         this.context.moveTo(x, y);
         this.context.moveTo(x, y);