Module: nagvis
Branch: master
Commit: f00b4f64cefd55017566a98711d3700b5fc4103e
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=f00b4f64cefd55017566a98711d3700b5fc4103e

Author: Lars Michelsen <[email protected]>
Date:   Sun Oct 31 00:37:26 2010 +0200

Duplicate code cleanup

---

 share/frontend/nagvis-js/js/frontendHover.js |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/share/frontend/nagvis-js/js/frontendHover.js 
b/share/frontend/nagvis-js/js/frontendHover.js
index cb58b0b..de942bb 100644
--- a/share/frontend/nagvis-js/js/frontendHover.js
+++ b/share/frontend/nagvis-js/js/frontendHover.js
@@ -53,8 +53,10 @@ function hoverHide() {
        }
 
        // Remove the hover timer
-       clearTimeout(_hoverTimer);
-       _hoverTimer = null;
+       if(_hoverTimer !== null) {
+               clearTimeout(_hoverTimer);
+               _hoverTimer = null;
+       }
        
        // Change cursor to auto when hiding hover menu
        document.body.style.cursor = 'auto';
@@ -64,10 +66,6 @@ function hoverShow(x, y, id) {
        // Hide all other hover menus
        hoverHide();
 
-       // Remove the hover timer
-       clearTimeout(_hoverTimer);
-       _hoverTimer = null;
-
        var hoverSpacer = 5;
 
        // document.body.scrollTop does not work in IE
@@ -80,7 +78,7 @@ function hoverShow(x, y, id) {
 
        // Maybe there is no hover menu defined for one object?
        if(hoverMenu === null) {
-               eventlog('hover', 'error', 'Found no context menu wit the id 
"'+id+'-hover"');
+               eventlog('hover', 'error', 'Found no hover menu wit the id 
"'+id+'-hover"');
                return false;
        }
        


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to