More actions
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'; | ||
}else { | }else { | ||
frameObj.style.left = ((x - parentPos.x) - windowSize.width) + 'px'; | |||
} | } | ||
frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px'; | |||
} | } | ||
return false; | return false; | ||