 ###
 defaults      = require 'lodash/defaults'
 ComponentView = require '../component/ComponentView'
+isUndefined   = require 'lodash/isUndefined'
 Packer        = require '../packer/Packer'
 throttle      = require 'lodash/throttle'
 vars          = require '../vars'

      pos = shifted[item.id]
      item.row = pos.row
      item.column = pos.col
      if item.id not in skip
        [top, left] = @fromGridCoords pos.row, pos.col
        [height, width] = @fromGridCoords pos.height, pos.width

  _addItem: (itemView) ->
    {height, width, id} = itemView

    if isUndefined(itemView.row) or isUndefined(itemView.column)
      [row, col] = @_packer.insert height, width, id
      itemView.row = row
      itemView.column = col
    else
      {row, column} = itemView
      col = column
      @_packer.insertAt height, width, row, column, id

    [top, left] = @fromGridCoords row, col
