comparison client/digitallibrary/jquery/jquery.digilib.js @ 701:2660b733a1e7 jquery

img reload works for fullscreen, but somehow not precise
author hertzhaft
date Fri, 28 Jan 2011 19:50:50 +0100
parents 5909beb76d16
children 89ff5133d1c1
comparison
equal deleted inserted replaced
700:5909beb76d16 701:2660b733a1e7
1308 'cursor' : 'default' 1308 'cursor' : 'default'
1309 }); 1309 });
1310 $(document).unbind("mousemove.digilib", dragMove); 1310 $(document).unbind("mousemove.digilib", dragMove);
1311 $(document).unbind("mouseup.digilib", dragEnd); 1311 $(document).unbind("mouseup.digilib", dragEnd);
1312 // calculate relative offset 1312 // calculate relative offset
1313 var x = -dx / $img.width();
1314 var y = -dy / $img.height();
1315 if (dx == 0 && dy == 0) 1313 if (dx == 0 && dy == 0)
1316 return false // no movement 1314 return false // no movement
1317 // reload with scaler image showing the new ausschnitt 1315 // reload with scaler image showing the new ausschnitt
1316 // digilib.moveBy(x, y);
1317 var pos = geom.position(-dx, -dy);
1318 var newPos = data.imgTrafo.invtransform(pos);
1319 var newArea = data.zoomArea.setPt1(newPos);
1320 data.zoomArea = MAX_ZOOMAREA.fit(newArea);
1318 $bg.hide(); 1321 $bg.hide();
1319 $img.show(); 1322 redisplay(data);
1320 // digilib.moveBy(x, y);
1321 return false; 1323 return false;
1322 }; 1324 };
1323 1325
1324 $scaler.bind("mousedown.digilib", dragStart); 1326 $scaler.bind("mousedown.digilib", dragStart);
1325 }; 1327 };