function rectContains(selection, points) {
      if (selection) {
          var isBrushed = selection[0][0] <= points.y && selection[1][0] >= points.y && // Check X coordinate
            selection[0][1] <= points.x && selection[1][1] >= points.x  // And Y coordinate
          //Remember points are at (y,x)
          return isBrushed;
      }
    }
// Helper function for determining which nodes are in brush
Helper function for determining which nodes are in brush
Helper function for determining which nodes are in brush
function rectContains(selection, points) {
      if (selection) {
          var isBrushed = selection[0][0] <= points.y && selection[1][0] >= points.y && 
            selection[0][1] <= points.x && selection[1][1] >= points.x  
          return isBrushed;
      }
    }
function rectContains ( selection , points ) { if ( selection ) { var isBrushed = selection [ 0 ] [ 0 ] <= points . y && selection [ 1 ] [ 0 ] >= points . y && selection [ 0 ] [ 1 ] <= points . x && selection [ 1 ] [ 1 ] >= points . x return isBrushed ; } }
Helper function for determining which nodes are in brush
Helper function for determining which nodes are in brush
// Check X coordinate // And Y coordinate //Remember points are at (y,x)