瀏覽代碼

don't cause render when setting osmd.DrawSkyLine (or DrawBottomLine)

sschmid 5 年之前
父節點
當前提交
3b65493dda
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

+ 4 - 2
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

@@ -837,7 +837,8 @@ export class OpenSheetMusicDisplay {
         this.drawSkyLine = value;
         if (this.drawer) {
             this.drawer.skyLineVisible = value;
-            this.render();
+            // this.render(); // note: we probably shouldn't automatically render when someone sets the setter
+            //   this can cause a lot of rendering time.
         }
     }
     public get DrawSkyLine(): boolean {
@@ -848,7 +849,8 @@ export class OpenSheetMusicDisplay {
         this.drawBottomLine = value;
         if (this.drawer) {
             this.drawer.bottomLineVisible = value;
-            this.render();
+            // this.render(); // note: we probably shouldn't automatically render when someone sets the setter
+            //   this can cause a lot of rendering time.
         }
     }
     public get DrawBottomLine(): boolean {