Author:   Lars Michelsen <[email protected]>
Date:     Tue Sep  4 16:49:26 2012 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Tue Sep  4 16:49:26 2012 +0200

Bugfix: Fixed hover menu positioning in IE

---

 ChangeLog                                    |    1 +
 share/frontend/nagvis-js/js/frontendHover.js |   22 ++++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 87972ed..289fd10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@ Core
 
 Frontend
   * Bugfix: Fixed hover menu positioning in scrolled maps
+  * Bugfix: Fixed hover menu positioning in IE
 
 Automap:
   * Bugfix: Fixed automaps object_id persisting code
diff --git a/share/frontend/nagvis-js/js/frontendHover.js 
b/share/frontend/nagvis-js/js/frontendHover.js
index fecba2a..8fa8deb 100644
--- a/share/frontend/nagvis-js/js/frontendHover.js
+++ b/share/frontend/nagvis-js/js/frontendHover.js
@@ -100,7 +100,11 @@ function hoverShow(x, y, id) {
     hoverMenu.style.display = 'none';
     hoverMenu.style.left = x + scrollLeft + hoverSpacer - getSidebarWidth() + 
'px';
     hoverMenu.style.top = y + scrollTop + hoverSpacer - getHeaderHeight() + 
'px';
-    hoverMenu.style.width = 'auto';
+    if(isIE) {
+        hoverMenu.style.width = '0px';
+    } else {
+        hoverMenu.style.width = 'auto';
+    }
     hoverMenu.style.display = '';
 
     // Set the width but leave some border at the screens edge
@@ -151,12 +155,12 @@ function hoverShow(x, y, id) {
         hoverMenu.style.width = pageWidth() - (2*hoverSpacer) + 'px';
     }
 
-    //var hoverTop = parseInt(hoverMenu.style.top.replace('px', ''));
-    //// Only move the menu to the top when the new top will not be
-    //// out of sight
-    //if(hoverTop + hoverMenu.clientHeight > pageHeight() && hoverTop - 
hoverMenu.clientHeight >= 0)
-    //    hoverMenu.style.top = hoverTop - hoverMenu.clientHeight - 
hoverSpacer + 'px';
-    //hoverTop = null;
+    var hoverTop = parseInt(hoverMenu.style.top.replace('px', ''));
+    // Only move the menu to the top when the new top will not be
+    // out of sight
+    if(hoverTop + hoverMenu.clientHeight > pageHeight() && hoverTop - 
hoverMenu.clientHeight >= 0)
+        hoverMenu.style.top = hoverTop - hoverMenu.clientHeight - hoverSpacer 
- 5 + 'px';
+    hoverTop = null;
 
     // Append to visible menus array
     _openHoverMenus.push(hoverMenu);
@@ -186,8 +190,10 @@ function hoverMenuInScreen(hoverMenu, hoverSpacer) {
     }
 
     // There is not enough spacing at the left viewport border
-    if(hoverLeft - hoverSpacer < 0)
+    if(hoverLeft - hoverSpacer < 0) {
+        // alert('not enough spacing at left viewport border');
         return false;
+    }
 
     scrollLeft = null;
     hoverLeft = null;


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to