[mapguide-commits] r7188 - trunk/MgDev/Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sun Nov 4 23:26:16 PST 2012
Author: jng
Date: 2012-11-04 23:26:15 -0800 (Sun, 04 Nov 2012)
New Revision: 7188
Modified:
trunk/MgDev/Web/src/viewerfiles/contextmenu.js
Log:
#2163: Fix context menu display problems when the legend content is scrollable. Patch by Bruno Scott.
Modified: trunk/MgDev/Web/src/viewerfiles/contextmenu.js
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/contextmenu.js 2012-11-04 20:24:23 UTC (rev 7187)
+++ trunk/MgDev/Web/src/viewerfiles/contextmenu.js 2012-11-05 07:26:15 UTC (rev 7188)
@@ -424,8 +424,8 @@
}
else
{
- w = window.innerWidth - 2;
- h = window.innerHeight - 2;
+ w = document.body.clientWidth - 2;
+ h = document.body.clientHeight - 2;
}
//calculate menu width and x position
@@ -509,7 +509,8 @@
menuObj.left = xPos;
menuObj.menuDiv.style.width = mw + "px";
- var yPos = y + mh >= h? h - mh - 1: y;
+ var yPos = y + mh >= h ? h - mh - 1 : y;
+ yPos = yPos + window.document.body.scrollTop;
menuObj.top = yPos;
menuObj.menuDiv.style.left = xPos + "px";
menuObj.menuDiv.style.visibility = "visible";
More information about the mapguide-commits
mailing list