Mercurial > hg > digilib
changeset 1553:e91a7c3e363d measure-maps
measure plugin: experiments with smoother bg image
author | hertzhaft |
---|---|
date | Fri, 28 Oct 2016 09:48:32 +0200 |
parents | 2fd8ad1ff9f4 |
children | f7b9e1ad9298 |
files | webapp/src/main/webapp/jquery/jquery-test-measure.html webapp/src/main/webapp/jquery/jquery.digilib.js |
diffstat | 2 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ <!DOCTYPE html> <html> <head> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="initial-scale=1.0"/> <title>Digilib measure test</title> @@ -34,11 +34,14 @@ <script type="text/javascript"> $(document).ready(function(){ + var $div = $('div#digilib'); var opts = { - interactionMode : 'fullscreen', - showRegionNumbers : true, + mo: 'lpic', + interactionMode: 'fullscreen', + previewImgWidth: 1000, + previewImgHeight: 1000, + maxBgSize: 10000 }; - var $div = $('div#digilib'); $div.digilib(opts); }); </script>
--- 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; };