preloadStart: function (callback) {
let $this = this;
this.init(function () {
- if($this.fluidbook.sound.enabled) {
+ if ($this.fluidbook.sound.enabled) {
$this.fluidbook.sound.preloadSounds();
}
if ($this.fluidbook.shortLoading) {
_preloadContentLinkTextures: function (page, clinks, links, enter, callback) {
var textures = {};
- let $this=this;
+ let $this = this;
var cl = '';
$.each(clinks, function (blendmode, links) {
nb++;
var i = $(this).data('id');
var url = $(this).data('image').replace(/^\.\./, 'data') + '?j=' + (new Date()).getTime();
- textures[i] = loadImage($this.getURL(url), cb, 'i_' + i);
+ textures[i] = $this.loadImage($this.getURL(url), cb, 'i_' + i);
});
if (nb === 0) {
// Load image before running zoom up animation
$this.fluidbook.displayLoader();
- loadImage(zoomImage, function (img) {
+ $this.fluidbook.loader.loadImage($this.fluidbook.loader.getURL(zoomImage), null, null, null, null, function (img) {
// Image is set as a background for better scaling / fitting via CSS
z.css('background-image', 'url(' + img.src + ')');
$this.fluidbook.hideLoader();
});
$(document).on('mousewheel', function (e) {
- if(this.element===undefined){
+ if (this.element === undefined) {
return true;
}
var s = $this.scale;
this.fluidbook.menu.viewWrap(view, 'zoomhd', 'data-fullscreen="1" dir="ltr"', 'h100');
this.element = $("#view").find('.zoomhdScale');
- this.image = fluidbook.loader.loadImage('data/links/' + link.to, null, null, null, null, function () {
+ this.image = this.fluidbook.loader.loadImage(this.fluidbook.loader.getURL('data/links/' + link.to), null, null, null, null, function () {
setTimeout(function () {
$this.initZoomHD();
setTimeout(function () {
},
setMovePos: function (x, y) {
- if(this.element===undefined){
+ if (this.element === undefined) {
return;
}
x = Math.max(this.dragMinX, Math.min(this.dragMaxX, x));
},
resize: function () {
- if(this.element===undefined){
+ if (this.element === undefined) {
return;
}
this.element.closest('.zoomhdRefScale').css({transform: 'scale(' + this.refScale + ')'});
axios.get(src, {
responseType: 'arraybuffer'
}).then(function (response) {
- var res = '<img ';
+ var res = '<img crossorigin="anonymous" ';
if (width != undefined && width != null) {
res += 'width="' + width + '" ';
}