changeset 740:95987594a1b0 jquery

image-drag with opacity :-)
author robcast
date Wed, 02 Feb 2011 14:56:50 +0100
parents 922c74a7b935
children ee620bcf4ab0
files client/digitallibrary/jquery/jquery.digilib.js
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Wed Feb 02 14:41:38 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Wed Feb 02 14:56:50 2011 +0100
@@ -1105,6 +1105,7 @@
             imgRect.adjustDiv($scaler);
             // show image in case it was hidden (for example in zoomDrag)
             $img.css('visibility', 'visible');
+            $scaler.css('opacity', '1');
             // display marks
             renderMarks(data);
             // TODO: digilib.showArrows(); // show arrow overlays for zoom navigation
@@ -1346,14 +1347,15 @@
             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
+            // hide the scaler img, show it as background of div instead
+            $img.css('visibility', 'hidden');
             $scaler.css({
                 'background-image' : 'url(' + $img.attr('src') + ')',
                 'background-repeat' : 'no-repeat',
                 'background-position' : 'top left',
+                'opacity' : '0.5',
                 'cursor' : 'move'
                 });
-            $img.css('visibility', 'hidden');
             $document.bind("mousemove.dlZoomDrag", dragMove);
             $document.bind("mouseup.dlZoomDrag", dragEnd);
             return false;