From: Vincent Vanwaelscappel Date: Tue, 23 Apr 2024 13:18:00 +0000 (+0200) Subject: wait #6879 @3.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=060fd4677d8275b2d2e90a030262f46ef9246d26;p=fluidbook-html5.git wait #6879 @3.5 --- 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); //