More actions
mNo edit summary |
mNo edit summary |
||
| Line 101: | Line 101: | ||
var _tooltipFrameClassName = 'uniwiki-tooltip-frame'; | var _tooltipFrameClassName = 'uniwiki-tooltip-frame'; | ||
var _activeTooltipIdx = -1; | var _activeTooltipIdx = -1; | ||
var _posCorrectionX = 50; var _posCorrectionY = 50; | |||
function checkElementByClassComp() { | function checkElementByClassComp() { | ||
if (document.getElementsByClassName == undefined) { | if (document.getElementsByClassName == undefined) { | ||
| Line 149: | Line 150: | ||
var parentObj = document.getElementById('tooltipframeidx-' + _activeTooltipIdx); | var parentObj = document.getElementById('tooltipframeidx-' + _activeTooltipIdx); | ||
var parentPos = getRelativeCoordinates(e, parentObj); | var parentPos = getRelativeCoordinates(e, parentObj); | ||
parentObj.style.left = (x - | parentObj.style.left = (x - _posCorrectionX) + 'px'; | ||
parentObj.style.top = (y - | parentObj.style.top = (y - _posCorrectionY) + 'px'; | ||
} | } | ||
return false; | return false; | ||
} | |||
function showTooltip(id) { | function showTooltip(id) { | ||
_activeTooltipIdx = id; | _activeTooltipIdx = id; | ||