From 32c62defabeca58fbe0a5ea2b05e7f2b24111596 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 27 Jun 2023 17:33:43 +0200 Subject: [PATCH] wait #6089 @0.5 --- js/libs/fluidbook/fluidbook.loader.js | 13 +++++++++++-- style/fluidbook.less | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.loader.js b/js/libs/fluidbook/fluidbook.loader.js index c1cdb5d8..ba0a14c3 100644 --- a/js/libs/fluidbook/fluidbook.loader.js +++ b/js/libs/fluidbook/fluidbook.loader.js @@ -511,6 +511,7 @@ FluidbookLoader.prototype = { try { this._loadTexture(page, callback, enter); } catch (e) { + console.warn(e); callback(); } } @@ -597,10 +598,12 @@ FluidbookLoader.prototype = { if (img.width === 0) { $this.deletePage(page); $this._preloadPage(page, callback); + console.warn('failed to load page for drawing texture ', page); return; } ctx.drawImage(img, -1, 0, d + 2, d); } catch (e) { + console.warn(e); } } @@ -615,7 +618,7 @@ FluidbookLoader.prototype = { var width = parseFloat($(this).css('width')) * wr; var height = parseFloat($(this).css('height')) * hr; - var blendmode=$(this).data('blendmode'); + var blendmode = $(this).data('blendmode'); if (blendmode === 'normal') { ctx.globalCompositeOperation = 'source-over'; @@ -627,6 +630,11 @@ FluidbookLoader.prototype = { } } + if($(this).is('[data-layer="bothsvg"]')){ + ctx.fillStyle = '#ffffff'; + ctx.fillRect(left, top, width, height); + } + if ($(this).is('[data-color]')) { ctx.fillStyle = $(this).attr('data-color'); ctx.fillRect(left, top, width, height); @@ -636,7 +644,7 @@ FluidbookLoader.prototype = { try { ctx.drawImage(textures[i], left, top, width, height); } catch (e) { - + console.warn(e); } } } @@ -676,6 +684,7 @@ FluidbookLoader.prototype = { } i.src = dataurl; } catch (e) { + console.warn(e); callback(); } }); diff --git a/style/fluidbook.less b/style/fluidbook.less index b3d4f974..e779ff0e 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1568,6 +1568,10 @@ html.ios body.portrait #interface { } } + &[data-layer="bothsvg"] { + background-color: #fff; + } + &[data-animation-hide] { display: none; } -- 2.39.5