1.27d Image Map: wrong mouse coordinates returned if nested
Status: Beta
Brought to you by:
ayashisunyday
When the image is nested within other objects, the getMousePosition function in pMap.js returns the wrong mouse cursos position. Solution:
UNDER THE FOLLOWING LINE (i.e. line 50)
pMap_MouseY -= document.getElementById(pMap_ImageID).offsetTop;
ADD
if (document.getElementById(pMap_ImageID).offsetParent) {
obj = document.getElementById(pMap_ImageID).offsetParent;
while (obj.offsetParent) {
pMap_MouseX -= obj.offsetLeft;
pMap_MouseY -= obj.offsetTop;
obj = obj.offsetParent;
}
}