       @_drag_mapper(ymap, ydiff)
 
 
-class SelectionToolView extends Bokeh.PlotWidget
+class SelectionToolView extends ToolView
   initialize : (options) ->
     super(options)
     select_callback = _.debounce((() => @_select_data()),50)

      '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

    return [xrange, yrange]

  _selecting : (e, x_, y_) ->
    [x, y] = @mouse_coords(e, e.layerX, e.layerY)
    @mset({'current_x' : x, 'current_y' : y})
    return null

