|
@@ -289,7 +289,7 @@ export class OpenSheetMusicDisplay {
|
|
const backend: VexFlowBackend = this.createBackend(this.backendType, page);
|
|
const backend: VexFlowBackend = this.createBackend(this.backendType, page);
|
|
const sizeWarningPartTwo: string = " exceeds CanvasBackend limit of 32767. Cutting off score.";
|
|
const sizeWarningPartTwo: string = " exceeds CanvasBackend limit of 32767. Cutting off score.";
|
|
if (backend.getOSMDBackendType() === BackendType.Canvas && width > canvasDimensionsLimit) {
|
|
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;
|
|
width = canvasDimensionsLimit;
|
|
}
|
|
}
|
|
if (this.rules.PageFormat && !this.rules.PageFormat.IsUndefined) {
|
|
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);
|
|
// console.log("pageformat not given. height: " + page.PositionAndShape.Size.height);
|
|
}
|
|
}
|
|
if (backend.getOSMDBackendType() === BackendType.Canvas && height > canvasDimensionsLimit) {
|
|
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.
|
|
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.
|
|
// TODO optional: reduce zoom to fit the score within the limit.
|
|
}
|
|
}
|