--- ECHO_content/js/hl_lib.js 2004/05/24 18:21:15 1.3 +++ ECHO_content/js/hl_lib.js 2004/12/02 12:01:08 1.4 @@ -14,9 +14,10 @@ You should have received a copy of the G along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -Authors: ROC 6.5.2004 +Authors: ROC 23.11.2004 */ +var hllibVersion = "1.0.1"; var hlAreas = new Object(); var hlTrafos = new Object(); @@ -34,9 +35,9 @@ function addArea(id, target_id, a_x, a_y hlAreas[id] = new Area(id, target_id, a_x, a_y, a_w, a_h, type); } -function parseTrafo(target_id) { +function parseTrafo(target) { // returns Transform for given target picsize - var picsize = getElementRect(getElement(target_id)); + var picsize = getElementRect(target); var trafo = new Transform(); // subtract area offset and size //trafo.concat(getTranslation(new Position(-dlArea.x, -dlArea.y))); @@ -65,18 +66,19 @@ function placeAreas() { pos.y += rect.height * 0.5 - isize.height * 0.5; moveElement(img, pos); if (img.layers) { - // N4 grow layer for border + // N4: grow layer for border img.resizeBy(2,2); } } else { if (img.layers) { - // N4 size transparent image for area + // for N4 we size a transparent image as the area var li = img.document.images[0]; li.width = rect.width; li.height = rect.height; } moveElement(img, rect); if (browserType.isIEWin) { + // IE/Win needs to set the area once highlightPair(area.id, false); } } @@ -145,8 +147,16 @@ function init() { map_init(); } +var elemScaler; +var dlTrafo; + function map_init() { - hlTrafos["overview"] = parseTrafo("overview"); + // initialise baselib + base_init(); + //alert("huhu4!"); + elemScaler = getElement("overview"); + dlTrafo = parseTrafo(elemScaler); + hlTrafos["overview"] = dlTrafo; placeAreas(); return null; }