Infobulle : avoid that the info balloon exceed limit of the display

This commit is contained in:
Dany De Bontridder 2017-11-04 08:49:31 +01:00
parent 2c48befc1d
commit 504d45e6b0

View file

@ -54,7 +54,9 @@ function hideBulle(p_ctl)
}
function displayBulle(p_comment) {
var d=document.getElementById('bulle');
var viewport = document.viewport.getDimensions();
d.innerHTML=p_comment;
if ( posX+offsetX > viewport.width-d.getWidth()) { posX-=d.getWidth()+20;}
d.style.top=posY+offsetY+"px";
d.style.left=posX+offsetX+"px";
d.style.visibility="visible";