]> _ Git - fluidbook-html5.git/commitdiff
wait #5087 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 21 Feb 2022 17:18:44 +0000 (18:18 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 21 Feb 2022 17:18:44 +0000 (18:18 +0100)
js/libs/fluidbook/fluidbook.loader.js

index 5e7e54426728889050e6c3b623d050dbb08c99be..c70949b7c5fff96b7f18142652e15926d8d12766 100644 (file)
@@ -504,13 +504,20 @@ FluidbookLoader.prototype = {
         }
     },
 
-    _preloadContentLinkTextures: function (page, clinks, enter, callback) {
+    _preloadContentLinkTextures: function (page, clinks, links, enter, callback) {
         var textures = {};
 
         var cl = '';
         $.each(clinks, function (blendmode, links) {
             cl += links.join('');
         });
+        $.each(links, function (blendmode, links) {
+            $.each(links, function (k, v) {
+                if (v.indexOf('data-force-texture') >= 0) {
+                    cl += v;
+                }
+            });
+        });
 
         if (cl === '') {
             callback(textures, cl);
@@ -536,6 +543,7 @@ FluidbookLoader.prototype = {
             var url = $(this).data('image').replace(/^\.\./, 'data') + '?j=' + (new Date()).getTime();
             textures[i] = loadImage(url, cb, 'i_' + i);
         });
+
         if (nb === 0) {
             callback(textures, cl);
             return;
@@ -552,7 +560,7 @@ FluidbookLoader.prototype = {
         }
         var $this = this;
 
-        this._preloadContentLinkTextures(page, this.fluidbook.settings.clinks[page], enter, function (textures, clinks) {
+        this._preloadContentLinkTextures(page, this.fluidbook.settings.clinks[page], this.fluidbook.settings.links[page], enter, function (textures, clinks) {
             var d = 1024;
             var c = document.getElementById("pscanvas");
             c.width = d;