diff --git a/mozilla/editor/ui/dialogs/content/EdImageMap.js b/mozilla/editor/ui/dialogs/content/EdImageMap.js index 3ad0730a433..7c096eceb15 100644 --- a/mozilla/editor/ui/dialogs/content/EdImageMap.js +++ b/mozilla/editor/ui/dialogs/content/EdImageMap.js @@ -33,9 +33,6 @@ function Startup(){ if (!InitEditorShell()) return; dump("EditorShell found for image map dialog\n"); - - doSetOKCancel(onOK, null); - initDialog(); } @@ -67,6 +64,8 @@ function initDialog(){ //Place Image newImg = frameDoc.createElement("img"); newImg.setAttribute("src", imageElement.getAttribute("src")); + newImg.setAttribute("width", imageElement.getAttribute("width")); + newImg.setAttribute("height", imageElement.getAttribute("height")); newImg.setAttribute("id", "mainImg"); frameDoc.getElementById("bgDiv").appendChild(newImg); @@ -75,6 +74,11 @@ function initDialog(){ recreateMap(); } +function exitImageMap(){ + dump("exit called"); + window.close(); +} + function hideToolbar(){ // Check to see if toolbar is already hidden if (tHide){ @@ -127,10 +131,10 @@ function recreateMap(){ else Poly(coords, href, null, null, true); } - imageElement.ownerDocument.body.removeChild(mapCollection[0]); + imageElement.ownerDocument.removeChild(mapCollection[0]); } -function onOK(){ +function finishMap(){ spots = frameDoc.getElementsByName("hotspot"); var len = spots.length; createMap(); @@ -214,6 +218,8 @@ function createPoly(which){ } function hotSpotProps(which){ + currentRect = null; + currentCir = null; if (which == null) return; href = which.getAttribute("href"); diff --git a/mozilla/editor/ui/dialogs/content/EdImageMap.xul b/mozilla/editor/ui/dialogs/content/EdImageMap.xul index 0b28d47b1f4..92a792a0a1f 100644 --- a/mozilla/editor/ui/dialogs/content/EdImageMap.xul +++ b/mozilla/editor/ui/dialogs/content/EdImageMap.xul @@ -1,5 +1,4 @@ - + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + - - - + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - + + + + + + + + + - - - - - - - - -