code: function(npos, pos, width, height){
        return Math.abs(pos.x - npos.x) <= width / 2
            && Math.abs(pos.y - npos.y) <= height / 2;
      }
docs: /*
  Method: contains
  
  Returns *true* if *pos* is contained in the area of the shape. Returns *false* otherwise.
  
  Parameters:
  
  npos - (object) An *x*, *y* object with the <Graph.Node> position.
  pos - (object) An *x*, *y* object with the position to check.
  width - (number) The width of the rendered rectangle.
  height - (number) The height of the rendered rectangle.
  
  Example:
  (start code js)
  NodeHelper.rectangle.contains({ x: 10, y: 30 }, { x: 15, y: 35 }, 30, 40);
  (end code)