1. Frederic De Groef
  2. sigmajs_sandbox

Commits

Frederic De Groef  committed c56b4a6

don't consider 'nd' nodes in the year range selection

  • Participants
  • Parent commits 7fbc70c
  • Branches default

Comments (0)

Files changed (1)

File test_sigma_gexf.js

View file
 
       sigInst.iterNodes(function (n){
         var node_attrs = n['attr']['attributes'];
-        var node_year = parseInt(getAttrValue(node_attrs, 'year'));
-        // show only nodes which belong within the selected range
-        if(node_year >= ui.values[0] && node_year <= ui.values[1]){
-          n.hidden = 0;
-        } else{
-          n.hidden = 1;
+        var node_year = getAttrValue(node_attrs, 'year');
+        if(node_year != 'nd'){
+          node_year = parseInt(node_year);
+          // show only nodes which belong within the selected range
+          if(node_year >= ui.values[0] && node_year <= ui.values[1]){
+            n.hidden = 0;
+          } else{
+            n.hidden = 1;
+          }
         }
       }).draw();
     }