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
mNo edit summary
fixed positioning algorithm for tooltip
Line 165: Line 165:
frameObj.style.width = maxTooltipWidth + 'px';
frameObj.style.width = maxTooltipWidth + 'px';
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px';
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px';
}else{
}
if((frameObj.offsetWidth + parentPos.x + 70) < windowSize.width) {
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px';
if((frameObj.offsetWidth + parentPos.x + 70) < windowSize.width) {
}else {
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px';
frameObj.style.left = ((x - parentPos.x) - frameObj.offsetWidth - _posCorrectionX) + 'px';
}else {
}
frameObj.style.left = ((x - parentPos.x) - frameObj.offsetWidth - _posCorrectionX) + 'px';
}
}
frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px';  
frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px';  
}
}