}
-
-
-
-
} else {
callback();
}
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);
//