# HG changeset patch # User hertzhaft # Date 1477640912 -7200 # Node ID e91a7c3e363d00d04719516278efdfa15d1c5e23 # Parent 2fd8ad1ff9f4ac61b36621c3e5ad3735cdfcac28 measure plugin: experiments with smoother bg image diff -r 2fd8ad1ff9f4 -r e91a7c3e363d webapp/src/main/webapp/jquery/jquery-test-measure.html --- a/webapp/src/main/webapp/jquery/jquery-test-measure.html Thu Oct 27 18:21:39 2016 +0200 +++ b/webapp/src/main/webapp/jquery/jquery-test-measure.html Fri Oct 28 09:48:32 2016 +0200 @@ -1,8 +1,8 @@ + - Digilib measure test @@ -34,11 +34,14 @@ diff -r 2fd8ad1ff9f4 -r e91a7c3e363d webapp/src/main/webapp/jquery/jquery.digilib.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.js Thu Oct 27 18:21:39 2016 +0200 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Fri Oct 28 09:48:32 2016 +0200 @@ -1279,9 +1279,10 @@ // adjust scaler div size (beware: setting position makes the element relative) imgRect.getSize().adjustDiv($scaler); // show image in case it was hidden (for example in zoomDrag) - $img.css('visibility', 'visible').fadeIn(); + $img.css('visibility', 'visible'); + $img.fadeIn(); // $scaler.css({'opacity' : '1'}); - $scaler.animate({opacity: 1}, 'fast'); + $scaler.fadeTo('slow', 1); data.hasPreviewBg = false; // update display (render marks, etc.) updateDisplay(data); @@ -1462,10 +1463,12 @@ scalerCss[data.bgSizeName] += ', ' + Math.round(fullRect.width) + 'px ' + Math.round(fullRect.height) + 'px'; scalerCss['background-position'] += ', ' + Math.round(fullRect.x) + 'px '+ Math.round(fullRect.y) + 'px'; } + // console.debug('setPreviewBg', scalerCss); } $scaler.css(scalerCss); // hide the scaler img, show background of div instead - $img.css('visibility', 'hidden').hide(); + $img.css('visibility', 'hidden'); + $img.hide(); data.hasPreviewBg = true; };