Mercurial > hg > digilib-old
changeset 1099:732390b4d81a
correct packRegions
author | hertzhaft |
---|---|
date | Wed, 24 Oct 2012 23:32:43 +0200 |
parents | f677b9ac5110 |
children | c5ed20cd24ae |
files | webapp/src/main/webapp/jquery/jquery.digilib.regions.js |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.regions.js Wed Oct 24 23:23:36 2012 +0200 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.regions.js Wed Oct 24 23:32:43 2012 +0200 @@ -681,9 +681,12 @@ data.settings.rg = null; return; } - var coords = $.map($regions, function($region, index) { - packCoords($region, '/'); - }); + var packRegion = function(region, index) { + var $region = $(region); + var rect = $region.data('rect'); + packCoords(rect, '/'); + }; + var coords = $.map($regions, packRegion); var rg = coords.join(','); data.settings.rg = rg; console.debug('pack regions:', rg);