Sunday, March 6, 2011

Slimbox disable image scaling

File slimebox.js (Mootools Slimebox Lightbox)
...
nextEffect: function() {
switch(this.step++) {
case 1:
this.center.className = '';

this.bottom.style.display="";

scale = Math.min((Window.getHeight() * 13/15 - this.bottom.scrollHeight - 16) / this.preload.height, (Window.getWidth()) / this.preload.width);
...

Comment line: scale = Math.min.......
Add new line: scale = 1;

The large image will not be scaled to fit window size, it will be display as it is, undistorted by resize operation.

No comments: