Mercurial > hg > digilib-old
changeset 706:f345b9657f5c jquery
some minor fixes, img reload still missing
author | hertzhaft |
---|---|
date | Fri, 28 Jan 2011 16:29:54 +0100 |
parents | e1995c540667 |
children | bbe9606d1bdc |
files | client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Fri Jan 28 16:14:32 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Fri Jan 28 16:29:54 2011 +0100 @@ -1262,7 +1262,7 @@ var $elem = data.$elem; var $scaler = data.$scaler; var $img = data.$img; - var $bg = $('<div class="bgDrag" style="display:none"/>'); + var $bg = $('<div class="bgDrag" style="display:none; position:absolute"/>'); $scaler.before($bg); // set as background var dragStart = function (evt) { @@ -1277,6 +1277,7 @@ $bg.css({ 'background-image' : 'url(' + $img.attr('src') + ')', 'background-repeat' : 'no-repeat', + 'background-position' : 'top left', 'cursor' : 'move' }); $img.hide(); @@ -1312,6 +1313,8 @@ if (dx == 0 && dy == 0) return false // no movement // reload with scaler image showing the new ausschnitt + $bg.hide(); + $img.show(); // digilib.moveBy(x, y); return false; }; @@ -1324,7 +1327,7 @@ var flags = data.scalerFlags; var q = flags.q2 || flags.q1 || 'q0'; // assume q0 as default return parseInt(q[1], 10); - }; + }; // set image quality as a number (0..2) var setQuality = function (data, qual) { @@ -1334,7 +1337,7 @@ delete flags['q'+i]; } flags['q'+qual] = 'q'+qual; - }; + }; // sets a key to a value (relative values with +/- if relative=true) var setNumValue = function(settings, key, value) {