# HG changeset patch # User robcast # Date 1326460077 -3600 # Node ID c4bd6f984aee5500ffdd96b9623bedd4fd936ae1 # Parent 02a20f020c06bace012d43c202a6fcc4a6ec8ef1 don't set position of scaler div, just size. diff -r 02a20f020c06 -r c4bd6f984aee webapp/src/main/webapp/jquery/jquery.digilib.geometry.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.geometry.js Tue Jan 10 17:44:18 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.geometry.js Fri Jan 13 14:07:57 2012 +0100 @@ -23,6 +23,10 @@ that.equals = function(other) { return (this.width === other.width && this.height === other.height); }; + // adjusts size of jQuery element "$elem" to this size + that.adjustDiv = function($elem) { + $elem.width(this.width).height(this.height); + }; that.toString = function() { return (this.width + "x" + this.height); }; diff -r 02a20f020c06 -r c4bd6f984aee webapp/src/main/webapp/jquery/jquery.digilib.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.js Tue Jan 10 17:44:18 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Fri Jan 13 14:07:57 2012 +0100 @@ -1263,8 +1263,8 @@ // reset busy cursor $('body').css('cursor', 'auto'); $scaler.css('cursor', 'auto'); - // adjust scaler div size - imgRect.adjustDiv($scaler); + // adjust scaler div size (beware: setting position makes the element relative) + imgRect.getSize().adjustDiv($scaler); // show image in case it was hidden (for example in zoomDrag) $img.css('visibility', 'visible'); $scaler.css({'opacity' : '1', 'background' : 'transparent'});