     setStyle(ctx, node_style)
     ctx.beginPath()
     renderShape(ctx, @shape, default_node_radius)
-    ctx.stroke()
-    ctx.restore()
-
-  mousedown: (pos) ->
+
+    if @dropdown_menu?
+      ctx.fillStyle = ctx.strokeStyle
+      ctx.fill()
+      ctx.restore()
+
+      ctx.textAlign = 'start'
+      ctx.textBaseline = 'top'
+
+      for option, i in @dropdown_menu.options
+        setStyle(ctx, menu_text_style)
+        measure = ctx.measureText(option.name)
+        ctx.fillStyle= if @dropdown_menu.selected == i then 'white' else 'black'
+        ctx.fillRect(
+          @dropdown_menu.pos.x,
+          @dropdown_menu.pos.y + menu_text_height * (i+1),
+          measure.width,
+          menu_text_height)
+
+        setStyle(ctx, if @dropdown_menu.selected == i
+            menu_text_invert_style
+          else
+            menu_text_style)
+
+        ctx.fillText(option.name,
+          @dropdown_menu.pos.x,
+          @dropdown_menu.pos.y + menu_text_height * (i+1))
+    else
+      ctx.stroke()
+      ctx.restore()
+
+
+  mousedown: (pos, idx) ->
     for n in @nodes
       if n.isHit(pos)
         if @merging?

link_style = stroke: 'white', width: 1.5
light_link_style = stroke: 'white', width: .5
node_text_style = fill: 'white', font: '16px monospace'

setStyle = (ctx, s) ->
  ctx.fillStyle   = s.fill   if s.fill


canvas.addEventListener 'mousedown', (e) ->
  pos = getCursorPosition(canvas, e)
  for idx in [collections.length - 1..0] by -1
    if collections[idx].mousedown(pos, idx)
      break

canvas.addEventListener 'mousemove', (e) ->
