changeset 957:c4bd6f984aee

don't set position of scaler div, just size.
author robcast
date Fri, 13 Jan 2012 14:07:57 +0100
parents 02a20f020c06
children 2a2e8c039c29
files webapp/src/main/webapp/jquery/jquery.digilib.geometry.js webapp/src/main/webapp/jquery/jquery.digilib.js
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);
         };
--- 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'});