full tooltip was shown on wrong position if the window is not in the primary display (part 2)

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-12-05 03:48:54 +09:00
parent e27c117343
commit 776cfbc5c7

View File

@ -205,9 +205,9 @@ FullTooltipManager.prototype = {
style.maxHeight = screenHeight.value+'px';
style.minWidth = 0;
style.minHeight = 0;
if (currentX + currentW >= screenWidth.value)
if (currentX + currentW + screenLeft.value >= screenWidth.value)
style.marginLeft = (Math.max(screenLeft.value, screenWidth.value - currentW) - this.window.screenX)+'px';
if (currentY + currentH >= screenHeight.value)
if (currentY + currentH + screenTop.value >= screenHeight.value)
style.marginTop = (Math.max(screenTop.value, screenHeight.value - currentH) - this.window.screenY)+'px';
},