Mercurial > hg > digilib
changeset 1552:2fd8ad1ff9f4 measure-maps
smoother transition when zoom-dragging
author | hertzhaft |
---|---|
date | Thu, 27 Oct 2016 18:21:39 +0200 |
parents | 6582bd2d0301 |
children | e91a7c3e363d |
files | webapp/src/main/webapp/jquery/jquery.digilib.js |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.js Thu Oct 27 16:28:07 2016 +0200 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Thu Oct 27 18:21:39 2016 +0200 @@ -1279,8 +1279,9 @@ // 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'); - $scaler.css({'opacity' : '1'}); + $img.css('visibility', 'visible').fadeIn(); + // $scaler.css({'opacity' : '1'}); + $scaler.animate({opacity: 1}, 'fast'); data.hasPreviewBg = false; // update display (render marks, etc.) updateDisplay(data); @@ -1414,8 +1415,6 @@ var imgTrafo = data.imgTrafo; var scalerPos = geom.position($scaler); var bgRect = null; - // hide the scaler img, show background of div instead - $img.css('visibility', 'hidden'); // use current image as first background var scalerCss = { 'background-image' : 'url(' + $img.attr('src') + ')', @@ -1465,6 +1464,8 @@ } } $scaler.css(scalerCss); + // hide the scaler img, show background of div instead + $img.css('visibility', 'hidden').hide(); data.hasPreviewBg = true; };