Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
Vanilla 1.0.1 is a product of Lussumo. More Information: Documentation, Community Support.
var pagesize = TB_getPageSize();
var x = pagesize[0] - 150;
var y = pagesize[1] - 150;
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = imageWidth * (y / imageHeight);
imageHeight = y;
if (imageWidth > x) {
imageHeight = imageHeight * (x / imageWidth);
imageWidth = x;
}
}
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
...and additionally then fixed the top of the view to be absolute (i.e the image is always put at the top of the html page, so if you scroll down an article and click on an image you may not see it until you scroll back up the page).
1 to 13 of 13