 class LabelView extends Renderer.View
   initialize: (options) ->
     super(options)
-    @$el.appendTo(@plot_view.$el.find('div.bk-canvas-overlays'))
-    @$el.addClass('label')
-    @$el.hide()
+    @set_data(@mget('source'))
+    @label_div = (null for i in @text)
 
   bind_bokeh_events: () ->
     if @mget('render_mode') == 'css'

      ctx.restore()

  _css_text: () ->
    console.log('css not implemented')

class Label extends Annotation.Model
  default_view: LabelView

  type: 'LabelAnnotation'

  mixins: ['text']

  props: ->
    return _.extend {}, super(), {
      x:            [ p.NumberSpec                      ]
      x_units:      [ p.SpatialUnits, 'data'            ]
      y:            [ p.NumberSpec                      ]
      y_units:      [ p.SpatialUnits, 'data'            ]
      text:         [ p.StringSpec,   { field :"text" } ]
      angle:        [ p.AngleSpec,    0                 ]

_ = require "underscore"
$ = require "jquery"

Annotation = require "./annotation"
Renderer = require "../renderers/renderer"
