Browse Source

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

sschmid 5 years ago
parent
commit
3b65493dda
1 changed files with 4 additions and 2 deletions
  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 {