 
   defaultBBoxAt: (pos) ->
     min: (x: pos.x - default_node_radius*2, y: pos.y - default_node_radius*2)
-    len: (x: default_node_radius*4, y: default_node_radius*4)
+    len: (x: default_node_radius*4, y: default_node_radius*2)
 
   copyNodesFrom: (nc) ->
     @nodes = [

    fn(this)

class ShannonFanoNode extends Node
  constructor: (@contains, @shape, @def_bbox, @label) ->
    @update()

  render: (ctx) ->

    ctx.save()
    setStyle(ctx, node_style)
    ctx.translate(
      @bbox.min.x + @bbox.len.x/2,
      @bbox.min.y + @bbox.len.y/2)

    ctx.save()
    ctx.scale(@bbox.len.x,@bbox.len.y)
    ctx.beginPath()
    renderShape(ctx, @shape, .75)
    # fix line width
    ctx.scale(1/@bbox.len.x, 1/@bbox.len.y)
    ctx.fill()
    ctx.stroke()
    ctx.restore()

    ctx.textAlign = 'center'
    ctx.textBaseline = 'top'

    ctx.fillText(@label + ":" + @value,0,@len_y)

    ctx.restore()

    for n in @contains
      n.render(ctx)

  update: ->
    @value = 0

    if @contains.length > 0
      minx = maxx = @contains[0].x
