Module: nagvis Branch: nagvis-1.5 Commit: 643af9fe1ba039eaf1f6164f0a5375fbfccb8ff7 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=643af9fe1ba039eaf1f6164f0a5375fbfccb8ff7
Author: Lars Michelsen <[email protected]> Date: Fri Dec 3 11:13:58 2010 +0100 Additional changes to fix hidden hover menus --- share/frontend/nagvis-js/js/frontendHover.js | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/share/frontend/nagvis-js/js/frontendHover.js b/share/frontend/nagvis-js/js/frontendHover.js index 972d0cb..5098da3 100644 --- a/share/frontend/nagvis-js/js/frontendHover.js +++ b/share/frontend/nagvis-js/js/frontendHover.js @@ -138,7 +138,7 @@ function hoverShow(x, y, id) { // And if the hover menu is still not on the screen move it to the left edge // and fill the whole screen width if(!hoverMenuInScreen(hoverMenu, hoverSpacer)) { - hoverMenu.style.left = hoverSpacer + 'px'; + hoverMenu.style.left = hoverSpacer + scrollLeft + 'px'; hoverMenu.style.width = pageWidth() - (2*hoverSpacer) + 'px'; } @@ -158,13 +158,16 @@ function hoverShow(x, y, id) { function hoverMenuInScreen(hoverMenu, hoverSpacer) { var hoverLeft = parseInt(hoverMenu.style.left.replace('px', '')); + var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : + document.documentElement.scrollLeft; - if(hoverLeft + hoverMenu.clientWidth >= pageWidth()) + if(hoverLeft + hoverMenu.clientWidth >= pageWidth() - scrollLeft) return false; if(hoverLeft - hoverSpacer < 0) return false; + scrollLeft = null; hoverLeft = null; hoverMenu = null; return true; ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
