]> _ Git - fluidbook-html5.git/commitdiff
wait #6303 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 26 Sep 2023 10:24:08 +0000 (12:24 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 26 Sep 2023 10:24:08 +0000 (12:24 +0200)
js/libs/fluidbook/fluidbook.loader.js

index a506273160d6d9c187215e05f0f4dba677ac71a9..1324ae9bf0307bb0dab9046b1e0b05483cba5909 100644 (file)
@@ -602,7 +602,7 @@ FluidbookLoader.prototype = {
             nb++;
             var i = $(this).data('id');
             var url = $(this).data('image').replace(/^\.\./, 'data') + '?j=' + (new Date()).getTime();
-            textures[i] = $this.loadImage($this.getURL(url),null,null,null,null, cb, 'i_' + i);
+            textures[i] = $this.loadImage($this.getURL(url), null, null, null, null, cb, 'i_' + i);
         });
 
         if (nb === 0) {
@@ -690,14 +690,13 @@ FluidbookLoader.prototype = {
                         var i = $(this).data('id');
                         if (textures[i] !== undefined && textures[i] !== null) {
                             try {
-                                ctx.drawImage(textures[i], left, top, width, height);
+                                ctx.drawImage(textures[i].get(0), left, top, width, height);
                             } catch (e) {
-                                console.warn(e);
+                                console.warn(textures[i]);
                             }
                         }
                     }
                 });
-
                 $('.texture_clinks[data-page="' + page + '"]').remove();
             }