changeset 732:55f2dd197ca9 jquery

really renamed birdMoveArea, really merged fix for no zoom area.
author robcast
date Tue, 01 Feb 2011 16:30:38 +0100
parents d69a72e8562f
children 25f2898696a2
files client/digitallibrary/jquery/jquery.digilib.js
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Tue Feb 01 16:11:45 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Tue Feb 01 16:30:38 2011 +0100
@@ -986,7 +986,7 @@
             // re-render
             renderBirdArea(data);
             // enable click and drag
-            birdMoveArea(data);
+            setupBirdDrag(data);
         }
     };
     
@@ -1132,7 +1132,7 @@
             // display red indicator around zoomarea
             renderBirdArea(data);
             // enable click and drag
-            birdMoveArea(data);
+            setupBirdDrag(data);
         };
     };
 
@@ -1280,7 +1280,7 @@
     };
 
     // bird's eye view zoom area click and drag handler
-    var birdMoveArea = function(data) {
+    var setupBirdDrag = function(data) {
         var $birdImg = data.$birdImg;
         var $birdZoom = data.$birdZoom;
         var $document = $(document);
@@ -1335,9 +1335,11 @@
         $document.unbind(".dlBirdMove");
         $birdImg.unbind(".dlBirdMove");
         $birdZoom.unbind(".dlBirdMove");
-        // set new handler
-        $birdImg.bind("mousedown.dlBirdMove", birdZoomStartDrag);
-        $birdZoom.bind("mousedown.dlBirdMove", birdZoomStartDrag);
+        if (! isFullArea(data.zoomArea)) {
+            // set new handler
+            $birdImg.bind("mousedown.dlBirdMove", birdZoomStartDrag);
+            $birdZoom.bind("mousedown.dlBirdMove", birdZoomStartDrag);
+        }
     };
 
     var setupZoomDrag = function(data) {
@@ -1443,7 +1445,7 @@
     };
 
     // auxiliary function (from old dllib.js)
-    isFullArea = function(area) {
+    var isFullArea = function(area) {
         return (area.width === 1.0) && (area.height === 1.0);
     };