Mercurial > hg > digilib-old
changeset 737:7c93bdbb5153 jquery
setup zoomdrag even when image is not initially zoomed
author | hertzhaft |
---|---|
date | Wed, 02 Feb 2011 00:41:16 +0100 |
parents | 54928116a7b2 |
children | b4460f0a540d |
files | client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Wed Feb 02 00:25:49 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Wed Feb 02 00:41:16 2011 +0100 @@ -1341,6 +1341,8 @@ // drag the image and load a new detail on mouse up var dragStart = function (evt) { + // don't start dragging if not zoomed + if (isFullArea(data.zoomArea)) return false; startPos = geom.position(evt); $imgRect = geom.rectangle($img); // hide the scaler image, show it as background of div instead @@ -1393,10 +1395,7 @@ // clear old handler $document.unbind(".dlZoomDrag"); $scaler.unbind(".dlBirdMove"); - if (! isFullArea(data.zoomArea)) { - // set new handler - $scaler.bind("mousedown.dlZoomDrag", dragStart); - } + $scaler.bind("mousedown.dlZoomDrag", dragStart); }; // get image quality as a number (0..2)