Mercurial > hg > digilib-old
comparison client/digitallibrary/jquery/jquery.digilib.js @ 679:f774b56d3c1a jquery
dragging birdview zooms correctly now
author | hertzhaft |
---|---|
date | Wed, 26 Jan 2011 01:26:45 +0100 |
parents | d50d24b7fd95 |
children | 8ce4ec381f87 |
comparison
equal
deleted
inserted
replaced
678:d50d24b7fd95 | 679:f774b56d3c1a |
---|---|
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 }; |