# HG changeset patch # User hertzhaft # Date 1296240650 -3600 # Node ID 120ace160386bc1fb8935b4d01c308baa88504df # Parent bbe9606d1bdcff1596b60bd76b88212f6bd680bc img reload works for fullscreen, but somehow not precise diff -r bbe9606d1bdc -r 120ace160386 client/digitallibrary/jquery/jquery-test-full.html --- a/client/digitallibrary/jquery/jquery-test-full.html Fri Jan 28 17:01:27 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-full.html Fri Jan 28 19:50:50 2011 +0100 @@ -70,6 +70,10 @@ display: none; z-index: 1000; } + + div.bgDrag { + background-color: grey; + } diff -r bbe9606d1bdc -r 120ace160386 client/digitallibrary/jquery/jquery.digilib.js --- a/client/digitallibrary/jquery/jquery.digilib.js Fri Jan 28 17:01:27 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Fri Jan 28 19:50:50 2011 +0100 @@ -1310,14 +1310,16 @@ $(document).unbind("mousemove.digilib", dragMove); $(document).unbind("mouseup.digilib", dragEnd); // calculate relative offset - var x = -dx / $img.width(); - var y = -dy / $img.height(); if (dx == 0 && dy == 0) return false // no movement // reload with scaler image showing the new ausschnitt + // digilib.moveBy(x, y); + var pos = geom.position(-dx, -dy); + var newPos = data.imgTrafo.invtransform(pos); + var newArea = data.zoomArea.setPt1(newPos); + data.zoomArea = MAX_ZOOMAREA.fit(newArea); $bg.hide(); - $img.show(); - // digilib.moveBy(x, y); + redisplay(data); return false; };