 
     view_coords: (sx, sy) ->
       [vx, vy] = [
-        @plot_view.view_state.sx_to_vx(sx),
-        @plot_view.view_state.sy_to_vy(sy)
+        @plot_view.canvas.sx_to_vx(sx)
+        @plot_view.canvas.sy_to_vy(sy)
       ]
       return [vx, vy]
 


        @_select(vx, vy, e)
      )
      @plot_view.canvas_wrapper.css('cursor', 'crosshair')

    _select: (vx, vy, e) ->
      geometry = {

          @tool_button.addClass('active')
        )

      @plot_view.canvas_view.canvas_wrapper.bind("mousedown", (e) =>
        if not @active and not @mget('always_active')
          return
        @start_posx = e.pageX
        @start_posy = e.pageY
      )

      @plot_view.canvas_view.canvas_wrapper.bind("mouseup", (e) =>
        if not @active and not @mget('always_active')
          return
        if @start_posx != e.pageX or @start_posy != e.pageY
