# HG changeset patch # User hertzhaft # Date 1351114363 -7200 # Node ID 732390b4d81aa36a8c73691c8b4827ac3f641916 # Parent f677b9ac5110288d837ea0fbb1c994afea9220ee correct packRegions diff -r f677b9ac5110 -r 732390b4d81a webapp/src/main/webapp/jquery/jquery.digilib.regions.js --- 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);