Explorar o código

refactor: console.log -> log.warn

sschmid %!s(int64=4) %!d(string=hai) anos
pai
achega
6c5e729418
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

+ 2 - 2
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

@@ -289,7 +289,7 @@ export class OpenSheetMusicDisplay {
             const backend: VexFlowBackend = this.createBackend(this.backendType, page);
             const sizeWarningPartTwo: string = " exceeds CanvasBackend limit of 32767. Cutting off score.";
             if (backend.getOSMDBackendType() === BackendType.Canvas && width > canvasDimensionsLimit) {
-                console.log("[OSMD] Warning: width of " + width + sizeWarningPartTwo);
+                log.warn("[OSMD] Warning: width of " + width + sizeWarningPartTwo);
                 width = canvasDimensionsLimit;
             }
             if (this.rules.PageFormat && !this.rules.PageFormat.IsUndefined) {
@@ -306,7 +306,7 @@ export class OpenSheetMusicDisplay {
                 // console.log("pageformat not given. height: " + page.PositionAndShape.Size.height);
             }
             if (backend.getOSMDBackendType() === BackendType.Canvas && height > canvasDimensionsLimit) {
-                console.log("[OSMD] Warning: height of " + height + sizeWarningPartTwo);
+                log.warn("[OSMD] Warning: height of " + height + sizeWarningPartTwo);
                 height = Math.min(height, canvasDimensionsLimit); // this cuts off the the score, but doesn't break rendering.
                 // TODO optional: reduce zoom to fit the score within the limit.
             }