 
     dx = e.pageX - @state.x #Click# - window.scrollX
     dy = e.pageY - @state.y #Click # + window.scrollY
-
-    console.log """
-      state.xClick = #{@state.xClick}
-      e.pageX = #{e.pageX}
-      delta = #{delta.x}
-    """
 
     @setState
       x: dx

    @props.tool_config ? @props.task.tool_config

  componentDidMount: ->
    # @updatePosition()

    tool_config = @toolConfig()
    if tool_config.suggest == 'common'

    focus: true

  componentWillReceiveProps: ->
    {x,y} = @getPosition @props.subject.data
    @setState
      x: x
      y: y, => @forceUpdate() # updates component position on new subject

  componentWillUpdate: ->
    # autofocus text input element
    @refs[@props.ref || 'input0'].getDOMNode().focus() if @props.focus

  componentWillUnmount: ->
    tool_config = @toolConfig()
