Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
adding position correction algorithm to tooltip display
mNo edit summary
Line 154: Line 154:
if((frameObj.offsetWidth + parentPos.x) < windowSize.width) {
if((frameObj.offsetWidth + parentPos.x) < windowSize.width) {
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px';  
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px';
frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px';
}else {
}else {
frameObj.style.left = ((x - parentPos.x) - windowSize.width) + 'px';
}
}
frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px';
}
}
return false;
return false;