Mercurial > hg > digilib-old
changeset 872:d46706f0eede jquery
crop region info
author | hertzhaft |
---|---|
date | Sun, 13 Mar 2011 18:50:38 +0100 |
parents | e17507559d35 |
children | 29f214f59654 |
files | client/digitallibrary/jquery/jquery.digilib.css client/digitallibrary/jquery/jquery.digilib.regions.js |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.css Sat Mar 12 23:41:40 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.css Sun Mar 13 18:50:38 2011 +0100 @@ -96,6 +96,7 @@ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; border: 2px solid lightcyan; + color: black; background-color: lightgrey; z-index: 1000; }
--- a/client/digitallibrary/jquery/jquery.digilib.regions.js Sat Mar 12 23:41:40 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.regions.js Sun Mar 13 18:50:38 2011 +0100 @@ -216,7 +216,11 @@ var $infoDiv = $('<div class="info html"/>'); $infoDiv.append($('<div/>').text('<div class="keep regioncontent">')); $.each(data.regions, function(index, r) { - var area = [r.x, r.y, r.width, r.height].join(','); + var area = [ + fn.cropFloatStr(r.x), + fn.cropFloatStr(r.y), + fn.cropFloatStr(r.width), + fn.cropFloatStr(r.height)].join(','); $infoDiv.append($('<div/>').text('<a coords="' + area + '" >')); }); $infoDiv.append($('<div/>').text('</div>')); @@ -227,7 +231,11 @@ var regionInfoSVG = function (data) { var $infoDiv = $('<div class="info svgattr"/>'); $.each(data.regions, function(index, r) { - var area = r.getAsSvg(); + var area = [ + fn.cropFloatStr(r.x), + fn.cropFloatStr(r.y), + fn.cropFloatStr(r.width), + fn.cropFloatStr(r.height)].join(' '); $infoDiv.append($('<div/>').text('"' + area + '"')); }); return $infoDiv;