changeset 679:f774b56d3c1a jquery

dragging birdview zooms correctly now
author hertzhaft
date Wed, 26 Jan 2011 01:26:45 +0100
parents d50d24b7fd95
children 8ce4ec381f87
files client/digitallibrary/jquery/jquery.digilib.js
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Wed Jan 26 01:01:53 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Wed Jan 26 01:26:45 2011 +0100
@@ -1038,8 +1038,11 @@
                 birdZoomMove(evt); // set center to click position
                 };
             if (data.zoomArea) {
-                settings.wx = cropFloat((newRect.x - birdImgRect.x) / birdImgRect.width);
-                settings.wy = cropFloat((newRect.y - birdImgRect.y) / birdImgRect.height);
+                // should always be true
+                var x = cropFloat((newRect.x - birdImgRect.x + 2) / birdImgRect.width);
+                var y = cropFloat((newRect.y - birdImgRect.y + 2) / birdImgRect.height);
+                data.zoomArea.x = x;
+                data.zoomArea.y = y;
                 };
             settings.ws = 1; // zoomed is always fit
             redisplay(data);