 
 collection_dropdown_menu = [
   {
-    name: 'sort by weight',
-    action: (c, t) ->
-      console.log('sort by weight')
-      c.addAnimations(c.sortNodes( ((n1, n2) -> n2.value - n1.value), t))
-  },
-  {
-    name: 'delete'
-    action: (c, t) ->
-      console.log('delete')
-      c.delete_flag = true
-  },
-  {
     name: 'tidy',
     action: (c, t) ->
       console.log('tidy trees')

    ctx.textAlign = 'center'
    ctx.textBaseline = 'middle'

    ctx.fillText(@value, 0, 0)
    ctx.restore()
 
    if @child0?


    @addAnimations([new CollectionAnimation(anims, -1)])

  removeValues: () ->
    rvFn = (node) ->
      if node.value?
        node.saved_value = node.value
      delete node.value

    for n in @nodes
      n.forAll(rvFn)

class HuffmanNodeCollection extends NodeCollection
  constructor: (shape) ->
    super shape
