       @shading.remove()
       @shading = null
 
-  _start_selecting : (e, x_, y_) ->
-    [x, y] = @mouse_coords(e, x_, y_)
+  _start_selecting : (e) ->
+    [x, y] = @mouse_coords(e, e.layerX, e.layerY)
     @mset({'start_x' : x, 'start_y' : y, 'current_x' : null, 'current_y' : null})
     for renderer in @mget('renderers')
       data_source = @model.resolve_ref(renderer).get_ref('data_source')

      'end' : end
    }, {'local' : true})

  _drag : (xdiff, ydiff, e, x__, y__) ->
    if _.isUndefined(xdiff) or _.isUndefined(ydiff)
      [x, y] = @mouse_coords(e, x__, y__)
      xdiff = x - @x
      ydiff = y - @y
      [@x, @y] = [x, y]
    xmappers = (@model.resolve_ref(x) for x in @mget('xmappers'))
    ymappers = (@model.resolve_ref(x) for x in @mget('ymappers'))
    for xmap in xmappers

      safebind(this, renderer.get_ref('xmapper'), 'change', select_callback)
      safebind(this, renderer.get_ref('ymapper'), 'change', select_callback)

    
  eventGeneratorClass : TwoPointEventGenerator
  evgen_options : {keyName:"ctrlKey", buttonText:"Selection Tool"}
  tool_events : {
    UpdatingMouseMove: "_selecting",
    SetBasepoint : "_start_selecting",
    deactivated : "_stop_selecting"}


  mouse_coords : (e, x, y) ->
    [x, y] = [@plot_model.rxpos(x), @plot_model.rypos(y)]
