# HG changeset patch # User hertzhaft # Date 1296603676 -3600 # Node ID 7c93bdbb5153820424af2b1452bf4a02e5a1eae1 # Parent 54928116a7b283561111cf273693492f9628605f setup zoomdrag even when image is not initially zoomed diff -r 54928116a7b2 -r 7c93bdbb5153 client/digitallibrary/jquery/jquery.digilib.js --- 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)