     # returns an array of the other nodes that belong to the same column. This
     # is used by the +y_offset+ method to calculate the right node position
     siblings: =>
-      items = _.groupBy(@view.node_list.models, (node) -> node.get('column'))
+      items = _.groupBy(@view.node_list, (node) -> node.get('column'))
       items[@get 'column']
 
     label: => @get('label') || @get('id')

          if link.value() == 0.0 then 'none' else 'inline'
        )

class D3.sankey.NodeList extends Backbone.Collection
  model: D3.sankey.Node

  # returns the height of the tallest column
  max_column_value: =>
    sums = {}
    @each (n) ->
      column = n.get 'column'
      sums[column] = sums[column] || 0
      sums[column] += n.value()
    _.max _.values(sums)

    draw_nodes: =>
      colors = d3.scale.category20()
      nodes = @svg.selectAll("g.node")
        .data(@node_list, (d) -> d.get('id'))
        .enter()
        .append("g")
        .attr("class", "node")
