More actions
mNo edit summary |
fixed absolute positioning error for tooltip |
||
| Line 101: | Line 101: | ||
var _tooltipFrameClassName = 'uniwiki-tooltip-frame'; | var _tooltipFrameClassName = 'uniwiki-tooltip-frame'; | ||
var _activeTooltipIdx = -1; | var _activeTooltipIdx = -1; | ||
var _posCorrectionX = | var _posCorrectionX = 20; var _posCorrectionY = 10; | ||
function checkElementByClassComp() { | function checkElementByClassComp() { | ||
if (document.getElementsByClassName == undefined) { | if (document.getElementsByClassName == undefined) { | ||
| Line 152: | Line 152: | ||
var frameObj = document.getElementById('tooltipframeidx-' + _activeTooltipIdx); | var frameObj = document.getElementById('tooltipframeidx-' + _activeTooltipIdx); | ||
frameObj.style.left = (x - parentPos.x) + 'px'; //500 | frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px'; //500 | ||
frameObj.style.top = (y - parentPos.y) + 'px'; //105 | frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px'; //105 | ||
} | } | ||
return false; | return false; | ||