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

Author: Lars Michelsen <[email protected]>
Date:   Thu Jan 20 17:51:24 2011 +0100

Added some comments

---

 share/frontend/nagvis-js/js/NagVisObject.js        |   23 ++++++++++++++++++++
 .../frontend/nagvis-js/js/NagVisStatefulObject.js  |    3 +-
 2 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/share/frontend/nagvis-js/js/NagVisObject.js 
b/share/frontend/nagvis-js/js/NagVisObject.js
index 97f28ba..89bd01d 100644
--- a/share/frontend/nagvis-js/js/NagVisObject.js
+++ b/share/frontend/nagvis-js/js/NagVisObject.js
@@ -437,6 +437,15 @@ var NagVisObject = Base.extend({
                return l;
        },
 
+       /**
+        * Calculates new coordinates for the object where the given parameter
+        * 'val' is the integer representing the current position of the object
+        * in absolute px coordinates. If the object position is related to
+        * another object this function detects it and transforms the abslute px
+        * coordinate to a relative coordinate and returns it.
+        *
+        * @author  Lars Michelsen <[email protected]>
+        */
        calcNewCoord: function(val, dir, num) {
                if(!isset(num))
                        num = -1;
@@ -477,6 +486,13 @@ var NagVisObject = Base.extend({
                }
        },
 
+       /**
+        * Used to gather all referenced parent object ids from the object
+        * configuration. Returns a object where the keys are the gathered
+        * parent object ids.
+        *
+        * @author  Lars Michelsen <[email protected]>
+        */
        getParentObjectIds: function() {
                var parentIds = {};
                var coords = (this.conf.x + ',' + this.conf.y).split(',');
@@ -491,6 +507,13 @@ var NagVisObject = Base.extend({
                return parentIds;
        },
 
+       /**
+        * This is used to add a child item to the object. Child items are
+        * gathered automatically by the frontend. Child positions depend
+        * on the related parent position on the map -> relative positioning.
+        *
+        * @author  Lars Michelsen <[email protected]>
+        */
        addChild: function(obj) {
                this.childs.push(obj);
                obj = null;
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js 
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index 715f93b..91a2eda 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -446,7 +446,8 @@ var NagVisStatefulObject = NagVisObject.extend({
                oContainerDiv.appendChild(oLineDiv);
                oLineDiv = null;
                
-               // Parse hover/link area only when needed
+               // Parse hover/link area only when needed. This is only the 
container
+               // The real area or labels are added later
                if((this.conf.url && this.conf.url !== '' && this.conf.url !== 
'#') || (this.conf.hover_menu && this.conf.hover_menu !== '')) {
                        var oLink = doc.createElement('a');
                        oLink.setAttribute('id', 
this.conf.object_id+'-linelink');


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to