 
     (dx*dx + dy*dy < @radius*@radius)
 
+  forAll: (fn) ->
+    fn(this)
+    return
+
+  tryAll: (fn) ->
+    return fn(this)
+
   radius: 15
 
 class Leaf extends Node

    @child1.render(ctx)

  forAll: (fn) ->
    if @child0.forAll?
      @child0.forAll(fn)
    else
      fn(@child0)

    if @child1.forAll?
      @child1.forAll(fn)
    else
      fn(@child1)

    fn(this)


        if mdx*mdx+mdy*mdy < 10*10
          # call it a click

          if @selected.node in @nodes
            @merging =
              node: @selected.node
              x: pos.x
              y: pos.y

    @selected = null

