       oh = @plot_view.view_state.get('outer_height')
 
       if @have_new_data or have_new_mapper_state
-        @radius = @distance(@data, 'x', 'radius', 'edge')
+        @radius = @distance('x', 'radius', 'edge')
         @have_new_data = false
 
       ow = @plot_view.view_state.get('outer_width')
       oh = @plot_view.view_state.get('outer_height')
+
+      #this seems to do hit testing to see if the desired point is in the view screen
       for i in [0..@mask.length-1]
         if (@sx[i]+@radius[i]) < 0 or (@sx[i]-@radius[i]) > ow or (@sy[i]+@radius[i]) < 0 or (@sy[i]-@radius[i]) > oh
           @mask[i] = false


    source_v_select: (attrname, glyph_props, datasource) ->
      # if the attribute is not on this property object at all, log a bad request
      if not (attrname of glpyh_props)
        console.log("requested vector selection of unknown property '#{ attrname }' on objects")
        return

      prop = glyph_props[attrname]
      # if prop.typed?
      #   result = new Float64Array(objs.length)

      # if the attribute specifies a field, and the field exists on
      # the column source, return the column from the column source


      if prop.field? and (prop.field of datasource.get('data'))
        console.log("source_v_select")
        return source.getcolumn(prop.field)
      else
        result = new Array(objs.length)
      '''
      objs = []
      for i in [0..objs.length-1]
        obj = objs[i]


        # If the user gave an explicit value, that should always be returned
        else if glyphprops[attrname].value?
          result[i] = glyphprops[attrname].value

        # otherwise, if the attribute exists on the object, return that value
        else if obj[attrname]?
          result[i] = obj[attrname]

        # finally, check for a default value on this property object that could be returned
        else if glyphprops[attrname].default?
          result[i] = glyphprops[attrname].default

        # failing that, just log a problem
        else
          console.log "vector selection for attribute '#{ attrname }' failed on object: #{ obj }"
          return

      return result
      '''

    _render: (plot_view, have_new_mapper_state=true) ->
      [@sx, @sy] = @plot_view.map_to_screen(@x, @glyph_props.x.units, @y, @glyph_props.y.units)

      )
      return glyph_props


    set_data: (request_render=true) ->
      source = @mget_obj('data_source')
      if source.type == 'ColumnDataSource'
        @x = @source_v_select('x', @glyph_props, source)
        @y = @source_v_select('y', @glyph_props, source)
        @mask = new Uint8Array(@x.length)
        @selected_mask = new Uint8Array(@x.length)
        for i in [0..@mask.length-1]
          @mask[i] = true
          @selected_mask[i] = false
        @have_new_data = true
        @data2 = source.datapoints()
  
      if request_render
        @request_render()
