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

Author: Lars Michelsen <[email protected]>
Date:   Thu Dec  2 21:57:04 2010 +0100

Fixed js error during object reloading

Conflicts:

        share/frontend/nagvis-js/js/lines.js

---

 share/frontend/nagvis-js/js/lines.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/share/frontend/nagvis-js/js/lines.js 
b/share/frontend/nagvis-js/js/lines.js
index c09d6a6..9bf0355 100644
--- a/share/frontend/nagvis-js/js/lines.js
+++ b/share/frontend/nagvis-js/js/lines.js
@@ -127,13 +127,16 @@ function drawLabel(objectId, num, lineType, lx, ly, z, 
perfdataA, perfdataB) {
        labelShift = getLabelShift(perfdataA);
 
        if(lineType == '13') {
-               
oLinkContainer.appendChild(drawNagVisTextbox(objectId+'-link'+num, 'box', 
'#ffffff', '#000000', (lx-labelShift), (ly-10), z, 'auto', 'auto', '<b>' + 
perfdataA + '</b>'));
+               if(oLinkContainer)
+                       
oLinkContainer.appendChild(drawNagVisTextbox(objectId+'-link'+num, 'box', 
'#ffffff', '#000000', (lx-labelShift), (ly-10), z, 'auto', 'auto', '<b>' + 
perfdataA + '</b>'));
        } else if(lineType == '14') {
                var label = drawNagVisTextbox(objectId+'-link'+num, 'box', 
'#ffffff', '#000000', (lx-labelShift), (ly-10), z, 'auto', 'auto', '<b>' + 
perfdataA + '</b>');
-               oLinkContainer.appendChild(label);
+               if(oLinkContainer)
+                       oLinkContainer.appendChild(label);
                labelShift = getLabelShift(perfdataB);
                label = drawNagVisTextbox(objectId+'-link'+num, 'box', 
'#ffffff', '#000000', (lx-labelShift), (ly+10), z, 'auto', 'auto', '<b>' + 
perfdataB + '</b>');
-               oLinkContainer.appendChild(label);
+               if(oLinkContainer)
+                       oLinkContainer.appendChild(label);
                label = null;
        }
 


------------------------------------------------------------------------------
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

Reply via email to