From 504d45e6b06474dc434a266029ebd47008b1a340 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 4 Nov 2017 08:49:31 +0100 Subject: [PATCH] Infobulle : avoid that the info balloon exceed limit of the display --- html/js/infobulle.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html/js/infobulle.js b/html/js/infobulle.js index 41750dda8..1167c1236 100644 --- a/html/js/infobulle.js +++ b/html/js/infobulle.js @@ -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";