noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 136/219: Infobulle : avoid that the info ball


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 136/219: Infobulle : avoid that the info balloon exceed limit of the display
Date: Mon, 18 Dec 2017 13:22:51 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 504d45e6b06474dc434a266029ebd47008b1a340
Author: Dany De Bontridder <address@hidden>
Date:   Sat Nov 4 08:49:31 2017 +0100

    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 41750dd..1167c12 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";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]