comparison client/digitallibrary/jquery/jquery.digilib.js @ 672:f996df5dea63 jquery

dragging birdview zooms correctly now
author hertzhaft
date Wed, 26 Jan 2011 01:26:45 +0100
parents ba582354e659
children 05a17fdd37a8
comparison
equal deleted inserted replaced
671:ba582354e659 672:f996df5dea63
1036 if (newRect == null) { // no movement happened 1036 if (newRect == null) { // no movement happened
1037 startPos = birdZoomRect.getCenter(); 1037 startPos = birdZoomRect.getCenter();
1038 birdZoomMove(evt); // set center to click position 1038 birdZoomMove(evt); // set center to click position
1039 }; 1039 };
1040 if (data.zoomArea) { 1040 if (data.zoomArea) {
1041 settings.wx = cropFloat((newRect.x - birdImgRect.x) / birdImgRect.width); 1041 // should always be true
1042 settings.wy = cropFloat((newRect.y - birdImgRect.y) / birdImgRect.height); 1042 var x = cropFloat((newRect.x - birdImgRect.x + 2) / birdImgRect.width);
1043 var y = cropFloat((newRect.y - birdImgRect.y + 2) / birdImgRect.height);
1044 data.zoomArea.x = x;
1045 data.zoomArea.y = y;
1043 }; 1046 };
1044 settings.ws = 1; // zoomed is always fit 1047 settings.ws = 1; // zoomed is always fit
1045 redisplay(data); 1048 redisplay(data);
1046 return false; 1049 return false;
1047 }; 1050 };