Is it possible to change the "loading..." position editing the CSS (.highslide-loading)?
thanks!
David
Code: Select all
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
if (!hs.fireEvent(this, 'onShowLoading')) return;
var exp = this,
l = (this.x.tpos + this.x.tb
+ (this.x.t - this.loading.offsetWidth) / 2) +'px',
t = (this.y.tpos
+ (this.y.t - this.loading.offsetHeight) / 2) +'px';
if (!tgt && this.last && this.transitions[1] == 'crossfade')
var tgt = this.last;
if (tgt) {
l = (tgt.x.min + tgt.x.cb + tgt.x.p1
+ (tgt.x.span - this.loading.offsetWidth) / 2) +'px';
t = (tgt.y.min + tgt.y.cb + tgt.y.p1
+ (tgt.y.span - this.loading.offsetHeight) / 2) +'px';
this.loading.style.zIndex = hs.zIndexCounter++;
}
// I ADDED THIS
if (document.all){
var getHeight = document.body.offsetHeight;
}
else {
var getHeight = window.innerHeight;
}
if (document.all){
var getWidth = document.body.offsetWidth;
}
else {
var getWidth = window.innerWidth;
}
l = (getWidth - this.loading.offsetWidth)/2 + 'px';
t = (getHeight - this.loading.offsetHeight)/2 + 'px';
// END OF I ADDED THIS
setTimeout(function () { if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t })}, 100);
},