[mapguide-commits] r5310 - branches/2.2/MgDev/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Oct 20 19:03:43 EDT 2010


Author: jng
Date: 2010-10-20 16:03:43 -0700 (Wed, 20 Oct 2010)
New Revision: 5310

Modified:
   branches/2.2/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
Port #1236 patch to 2.2 branch. Patch reviewed by Arthur Liu

Modified: branches/2.2/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- branches/2.2/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2010-10-20 16:53:11 UTC (rev 5309)
+++ branches/2.2/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2010-10-20 23:03:43 UTC (rev 5310)
@@ -3519,6 +3519,7 @@
 
 function RequestHyperLinkData(id, x, y, exec)
 {
+    if(IsMouseInsideHyperlink()) return;
     if(lastMapRcv != mapId) return;
     if(isPopupOpen(tbMenu) || isPopupOpen(ctxMenu)) return;
     req = CreateRequestHandler();
@@ -3587,9 +3588,39 @@
 function HideHyperlinkTip()
 {
     tip = document.getElementById("hlTip");
-    if(tip != null) tip.style.visibility = "hidden";
+    if(tip != null) 
+    {
+        if (IsMouseInsideHyperlink())
+        {
+            return;
+        }
+        tip.style.visibility = "hidden";
+    }
 }
 
+function IsMouseInsideHyperlink()
+{
+    tip = document.getElementById("hlTip");
+    var info = document.getElementById("InfoBand");
+    if(tip != null && info != null) 
+    {
+        if (tip.style.visibility == "hidden")
+            return false;
+
+        var xpad = 20;
+        var ypad = 30;
+        var iw = parseInt(info.style.width);
+        var cx = hlData.curx + iw;
+        var cy = hlData.cury;
+        var minx = (parseInt(tip.style.left)) - xpad;
+        var miny = parseInt(tip.style.top) - ypad;
+        var maxx = minx + parseInt(tip.offsetWidth) + xpad;
+        var maxy = miny + parseInt(tip.offsetHeight) + ypad;
+        return (cx >= minx && cx <= maxx && cy >= miny && cy <= maxy);
+    }
+    return false;
+}
+
 function ExecuteHyperlink(url)
 {
     var linkURL;



More information about the mapguide-commits mailing list