From 060fd4677d8275b2d2e90a030262f46ef9246d26 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 23 Apr 2024 15:18:00 +0200 Subject: [PATCH] wait #6879 @3.5 --- js/libs/fluidbook/fluidbook.loader.js | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.loader.js b/js/libs/fluidbook/fluidbook.loader.js index 1fe9152c..3aa8e863 100644 --- a/js/libs/fluidbook/fluidbook.loader.js +++ b/js/libs/fluidbook/fluidbook.loader.js @@ -872,10 +872,6 @@ FluidbookLoader.prototype = { } - - - - } else { callback(); } @@ -1062,21 +1058,21 @@ FluidbookLoader.prototype = { renderSVGToCanvas: function (page, ctx, cw, ch, callback) { let $this = this; - var img = this.texts[page]; + + var img = $this.texts[page]; if (img !== undefined && img !== null) { img = img.get(0); - if (img.width === 0) { - $this.deletePage(page); - $this._preloadPage(page, function () { - - }); - return; - } ctx.drawImage(img, 0, 0, img.width - 2, img.height - 2, 0, 0, cw, ch); + if (callback !== undefined) { + callback(); + } + } else { + setTimeout(function () { + $this.renderSVGToCanvas(page, ctx, cw, ch, callback); + }, 500); } - if (callback !== undefined) { - callback(); - } + + // // let textThickness = parseFloat($this.fluidbook.settings.textsThickness); // -- 2.39.5