   view_options: () ->
     _.extend({plot_model: @model, plot_view: @}, @options)
 
-  build_tools: () ->
-    build_views(@tools, @mget_obj('tools'), @view_options())
-
-  bind_tools: () ->
-    for toolspec in @mget('tools')
-      @tools[toolspec.id].bind_events(this)
-
   events:
     "mousemove .bokeh_canvas_wrapper": "_mousemove"
     "mousedown .bokeh_canvas_wrapper": "_mousedown"


    return [x, y]

  render_init: () ->
    #FIXME template
    @$el.append($("""
      <div class='button_bar'/>
      <div class='bokeh_canvas_wrapper'>
        <canvas class='bokeh_canvas'></canvas>
      </div>
      """))
    @canvas_wrapper = @$el.find('.bokeh_canvas_wrapper')
    @canvas = @$el.find('canvas.bokeh_canvas')

  build_views: ()->
    build_views(@renderers, @mget_obj('renderers'), @view_options())


    @build_tools()
    @bind_tools()
    return this

  bind_bokeh_events: () ->
    safebind(this, @view_state, 'change', @request_render_canvas)
    safebind(this, @x_range, 'change', @request_render)
    safebind(this, @y_range, 'change', @request_render)
    safebind(this, @model, 'change:renderers', @build_views)
