       click: (e) =>
         pos = $(canvas).offset()
         _mouseP = arbor.Point(e.pageX-pos.left, e.pageY-pos.top)
-        object = particleSystem.nearest(_mouseP)
 
-        if @nodeHitTest(object.node, _mouseP)
+        hitEdge = false
+        particleSystem.eachEdge (edge, fromPoint, toPoint) =>
+          if (@edgeHitTest(edge, _mouseP, 10))
+            objectHandler.selectedEdge edge.data._neo_id
+            hitEdge = true
+            return false
+
+        if !hitEdge
+          object = particleSystem.nearest(_mouseP)
           objectHandler.selectedNode(object.node.name)
-        else
-          # click on an edge?
-          particleSystem.eachEdge (edge, fromPoint, toPoint) =>
-            if (@edgeHitTest(edge, _mouseP, 10))
-              objectHandler.selectedEdge edge.data._neo_id
-              return false
-
         false
 
     $(canvas)


  drawNode: (node, point) ->
      MARGIN = 10

      nodeView = view node.data
      ctx.font = "10pt Times"
      {width, height, count} = util.textSize ctx, nodeView

      x = util.centerToEdge(point.x, width)
      y = util.centerToEdge(point.y, height) + MARGIN*2
      util.drawText(ctx, nodeView, x, y)

  drawEdge: (edge, fromPoint, toPoint) ->
    ctx.strokeStyle = 'rgba(0,0,0, .333)'
