cbExit: function(){ alert('show exit undefined'); },
percentage: 98,
delay: 5000,
- fxduration: 200,
+ fxduration: 200
}
},
this.cache = {
prev: {},
curr: {},
- next: {},
+ next: {}
};
/*
* thescripts.com/forum/thread170365.html
zIndex: 4,
display: 'none',
width: this.coords.width,
- height: this.coords.height,
+ height: this.coords.height
});
this.container.grab(this.loadingdiv);
var newcache = {
prev: (id > 0)?this.prepare(id-1):{},
curr: this.prepare(id),
- next: (id < (this.vimgs.length-1))?this.prepare(id+1):{},
+ next: (id < (this.vimgs.length-1))?this.prepare(id+1):{}
};
delete this.cache;
this.cache = newcache;
id: id,
vi: vi,
ready: false,
- url: this.vimgs[id][2][vi][2],
+ url: this.vimgs[id][2][vi][2]
};
cachel.img = this.bgload(cachel);
}
return new Asset.image(this.vimgs[cachel.id][2][cachel.vi][2],{
id: this.vimgs[cachel.id][0],
title: this.vimgs[cachel.id][1],
- onload: this.loadcomplete.bind(this,[cachel]),
+ onload: this.loadcomplete.bind(this,[cachel])
});
},
setStyles(this.calcsize(cachel)).
setStyles({
zIndex: 3,
- opacity: 0,
+ opacity: 0
});
this.ondisplay.replaces(this.prevdisplay).
setProperty('alt', 'Previous Image').
effect: function(){
this.fx = new Fx.Tween(this.ondisplay, {
- duration: this.options.fxduration,
+ duration: this.options.fxduration
});
this.fx.addEvent('complete',this.displaycomplete.bind(this));
this.fx.start('opacity', 0, 1);
},
calcsize: function(cachel){
+ if (! cachel.url) {
+ return {
+ position: 'absolute',
+ top: 0+'px',
+ left: 0+'px',
+ width: this.coords.width,
+ height: this.coords.height
+ };
+ }
var factor = 1;
var candidate;
candidate = this.target.width /
top: t+'px',
left: l+'px',
width: w,
- height: h,
+ height: h
};
},
this.loadingdiv.setStyles({
display: 'block',
width: this.coords.width,
- height: this.coords.height,
+ height: this.coords.height
});
},
width: Math.round(this.coords.width *
this.options.percentage / 100),
height: Math.round(this.coords.height *
- this.options.percentage / 100),
+ this.options.percentage / 100)
};
/* alert('coords: '+this.coords.width+'x'+this.coords.height+
', target: '+this.target.width+'x'+this.target.height); */
- },
+ }
});
+
Show.implement(new Options);
Show.implement(new Events);