From: Vincent Vanwaelscappel Date: Mon, 21 Feb 2022 17:18:44 +0000 (+0100) Subject: wait #5087 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=989382afa920e04824d5bc79a3de0cb098f8bf54;p=fluidbook-html5.git wait #5087 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.loader.js b/js/libs/fluidbook/fluidbook.loader.js index 5e7e5442..c70949b7 100644 --- a/js/libs/fluidbook/fluidbook.loader.js +++ b/js/libs/fluidbook/fluidbook.loader.js @@ -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;