   statics:
     initCoords: null
 
-    defaultValues: ({x, y}) ->
+    defaultValues: ({x}) ->
       x: x
-      y: 0
       width: DEFAULT_WIDTH
 
-    initStart: ({x, y}, mark) ->
+    initStart: ({x}, mark) ->
       @initCoords = {x, 0}
       {x, 0, _inProgress: true}
 

    @props.onChange @props.mark

  handleLeftDrag: (e, d) ->
    @props.mark.x += d.x / @props.scale.horizontal if @props.mark.width >= MINIMUM_WIDTH
    @props.mark.width -= d.x / @props.scale.horizontal 
    @props.onChange @props.mark if @props.mark.width >= MINIMUM_WIDTH

  handleRightDrag: (e, d) ->
    @props.mark.width += d.x / @props.scale.horizontal
    @props.onChange @props.mark 

  normalizeMark: ->
    if @props.mark.width < MINIMUM_WIDTH
      @props.mark.x += @props.mark.width if @props.mark.width >= MINIMUM_WIDTH
      @props.mark.width is MINIMUM_WIDTH

    @props.onChange @props.mark if @props.mark.width >= MINIMUM_WIDTH

Draggable = require '../../lib/draggable'
DeleteButton = require './delete-button'

DEFAULT_WIDTH = 25
MINIMUM_WIDTH = 25

