]> _ Git - fluidbook-html5.git/commitdiff
wait #6089 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Jun 2023 15:33:43 +0000 (17:33 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 27 Jun 2023 15:33:43 +0000 (17:33 +0200)
js/libs/fluidbook/fluidbook.loader.js
style/fluidbook.less

index c1cdb5d8c5803e97fb887e56e5aeda021c5716b7..ba0a14c3f2f99b2598aca950e58df4c55cba5bf7 100644 (file)
@@ -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();
             }
         });
index b3d4f9742dd6e5bcd2cd6eca42e23b681e8d0047..e779ff0edba254fadda8d8cf9afcc19113feaf54 100644 (file)
@@ -1568,6 +1568,10 @@ html.ios body.portrait #interface {
     }
   }
 
+  &[data-layer="bothsvg"] {
+    background-color: #fff;
+  }
+
   &[data-animation-hide] {
     display: none;
   }