             @ranges.push @activeRange
             @activeRange = null
 
-
         unless @activeRange?
             @activeRange = new Slick.Range(cell.row, cell.cell, cell.row, cell.cell)
             @activeRangeComplete = false
         else
             @activeRange.fromRow = Math.min(@activeRange.fromRow, cell.row)
-            @activeRange.toRow = Math.max(@activeRange.toRow, cell.row)
+            @activeRange.toRow = Math.max(@activeRange.fromRow, cell.row)
 
             @activeRange.fromCell = Math.min(@activeRange.fromCell, cell.cell)
-            @activeRange.toCell = Math.max(@activeRange.toCell, cell.cell)
+            @activeRange.toCell = Math.max(@activeRange.fromCell, cell.cell)
             @activeRangeComplete = true
 
          @onSelectedRangesChanged.notify @ranges.concat( [ @activeRange ] )
+
+    handleGridClick: (e, args) =>
+        @onMouseDown(e, args)
 
     onKeyDown: (e, args) =>
         if e.keyCode == 27

    onClick: (e, args) =>

    onMouseEnter: (e, args) =>

    destroy: =>


    init: (@grid) =>
        @grid.onClick.subscribe(@handleGridClick)
        @grid.onDblClick.subscribe(@onDoubleClick)
        @grid.onMouseEnter.subscribe(@onMouseEnter)
        @grid.onKeyDown.subscribe(@onKeyDown)
        @grid.onMouseDown.subscribe(@onMouseDown)

    onMouseDown: (e, args) =>
        cell = @grid.getCellFromEvent(e)
        @dragCell = cell
        return unless cell?

        unless e.shiftKey or e.metaKey
