 
   _canvas_text: () ->
     ctx = @plot_view.canvas_view.ctx
-    for i in [0...@text.length]
+    for i in [0...@_text.length]
       ctx.save()
 
       ctx.rotate(@mget('angle'))
-      ctx.translate(@sx[i] + @x_offset[i], @sy[i] + @y_offset[i])
+      ctx.translate(@sx[i] + @_x_offset[i], @sy[i] + @_y_offset[i])
 
       ctx.beginPath()
       ctx.rect(@x_shift[i], @y_shift[i], @width[i], @height[i])


  @define {
      x:            [ p.NumberSpec,                     ]
      y:            [ p.NumberSpec,                     ]
      x_units:      [ p.SpatialUnits, 'data'            ]
      y_units:      [ p.SpatialUnits, 'data'            ]
      text:         [ p.StringSpec,   { field :"text" } ]
      angle:        [ p.AngleSpec,    0                 ]

        @line_dash = ld

    ctx = @plot_view.canvas_view.ctx
    for i in [0...@_text.length]
      @visuals.text.set_vectorize(ctx, i)
      @width[i] = ctx.measureText(@_text[i]).width
      @height[i] = ctx.measureText(@_text[i]).ascent / 1.175
      [ @x_shift[i], @y_shift[i] ] = @_calculate_offset(ctx, @height[i], @width[i])

  _map_data: () ->
    if @mget('x_units') == "data"
      vx = @xmapper.v_map_to_target(@_x)
    else
      vx = @_x.slice(0) # make deep copy to not mutate
    sx = @canvas.v_vx_to_sx(vx)

    if @mget('y_units') == "data"
      vy = @ymapper.v_map_to_target(@_y)
    else
      vy = @_y.slice(0) # make deep copy to not mutate

    sy = @canvas.v_vy_to_sy(vy)

