fixing new zoomer

This commit is contained in:
ville rantanen
2012-05-29 12:27:21 +03:00
parent 8af9aa8c07
commit 3967467127
2 changed files with 35 additions and 17 deletions

View File

@@ -94,16 +94,26 @@ function showbigimage(i) {
dc.style.display='block';
if (zoom) {
$(document).ready(function() {
var options = {
zoomType: 'innerzoom',
preloadImages: false,
alwaysOn:true,
};
};
$('#imagesingle').css('width',width);
$('#imagesingle').css('height',height);
$('#imagesingle').css('display','none');
// hide the distorted imagesingle
var bigImg=new Image();
bigImg.src=encodeURIComponent(imagelist[i]);
$('.linktobig').jqzoom(options);
$(bigImg).load(function() {
if (bigImg.width < width) {
var leftoffset=(width - bigImg.width)/2;
$('.zoompad').css('left',leftoffset);
$('body').css('overflow-x','hidden');
}
});
});
}
return;
@@ -632,6 +642,10 @@ function keypressed(e) {
if (currentimage>(imagelist.length-1)) { currentimage=0; }
showimage(currentimage);
}
// a: all thumbs
if (unicode==65) {
allthumbs();
}
// f: fullscreen
if (unicode==70) {
flipfullscreen();
@@ -895,6 +909,14 @@ f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){fo
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
/* jQuery related stuff */
$(function(){
$(window).resize(function(){
showimage(currentimage);
});
});
/*!
* jQzoom Evolution Library v2.3 - Javascript Image magnifier