# HG changeset patch # User hertzhaft # Date 1299488076 -3600 # Node ID 4658ec2f9565d45158496e35b3fafb0a7313da45 # Parent 5922c444cd119c3d137f0e737682427325e72b57 why not use coords attribute for coords? diff -r 5922c444cd11 -r 4658ec2f9565 client/digitallibrary/jquery/jquery-test-embedded.html --- a/client/digitallibrary/jquery/jquery-test-embedded.html Mon Mar 07 09:30:55 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-embedded.html Mon Mar 07 09:54:36 2011 +0100 @@ -66,8 +66,8 @@ var opts = { interactionMode : 'embedded', scalerBaseUrl : 'http://digilib.biblhertz.it/digilib04/servlet/Scaler', - showRegionNumbers : true, - autoRegionLinks : false + showRegionNumbers : false, + autoRegionLinks : true }; var $div = $('div.digilib'); $div.digilib(opts); @@ -99,9 +99,9 @@
- MPI fuer Wissenschaftsgeschichte - Bibliotheca Hertziana - + MPI fuer Wissenschaftsgeschichte + Bibliotheca Hertziana +
diff -r 5922c444cd11 -r 4658ec2f9565 client/digitallibrary/jquery/jquery-test-full.html --- a/client/digitallibrary/jquery/jquery-test-full.html Mon Mar 07 09:30:55 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-full.html Mon Mar 07 09:54:36 2011 +0100 @@ -84,11 +84,11 @@
-
- MPI fuer Wissenschaftsgeschichte - Bibliotheca Hertziana - -
+
+ MPI fuer Wissenschaftsgeschichte + Bibliotheca Hertziana + +
DEBUG
diff -r 5922c444cd11 -r 4658ec2f9565 client/digitallibrary/jquery/jquery.digilib.css --- a/client/digitallibrary/jquery/jquery.digilib.css Mon Mar 07 09:30:55 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.css Mon Mar 07 09:54:36 2011 +0100 @@ -68,13 +68,13 @@ div.region { color: white; - font-size: 80%; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; } div.region a.regionnumber { color: white; text-decoration: none; - font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 11px; text-align: center; diff -r 5922c444cd11 -r 4658ec2f9565 client/digitallibrary/jquery/jquery.digilib.regions.js --- a/client/digitallibrary/jquery/jquery.digilib.regions.js Mon Mar 07 09:30:55 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.regions.js Mon Mar 07 09:54:36 2011 +0100 @@ -239,10 +239,9 @@ console.debug("createRegionsFromHTML. elems: ", $content); $content.each(function(index, a) { var $a = $(a); - // the "rel" attribute contains the region coords - var rel = $a.attr('rel'); - var area = rel.replace(/^area:/i, ''); - var pos = area.split("/", 4); + // the "coords" attribute contains the region coords (0..1) + var coords = $a.attr('coords'); + var pos = coords.split(",", 4); var rect = geom.rectangle(pos[0], pos[1], pos[2], pos[3]); regions.push(rect); // create the div @@ -300,10 +299,10 @@ var rg = data.settings.rg; if (rg == null) return; var regions = data.regions; - var rs = rg.split(","); + var rs = rg.split(";"); for (var i = 0; i < rs.length; i++) { var r = rs[i]; - var pos = r.split("/", 4); + var pos = r.split(",", 4); var rect = geom.rectangle(pos[0], pos[1], pos[2], pos[3]); regions.push(rect); } @@ -320,14 +319,14 @@ for (var i = 0; i < regions.length; i++) { region = regions[i]; if (i) { - rg += ','; + rg += ';'; } rg += [ fn.cropFloatStr(region.x), fn.cropFloatStr(region.y), fn.cropFloatStr(region.width), fn.cropFloatStr(region.height) - ].join('/'); + ].join(','); } data.settings.rg = rg; };