     @plotview = plotview
     @eventSink = eventSink
     @plotview.moveCallbacks.push((e, x, y) =>
-      if not @draggin2
+      if not @dragging
         return
       if not @tool_active
         return
       if not @basepoint_set
-        @draggin2 = true
+        @dragging = true
         @basepoint_set = true
         eventSink.trigger("#{toolName}:SetBasepoint", e)
       else

      @model.resolve_ref(renderer).get_ref('data_source').set('selecting', false)
      @model.resolve_ref(renderer).get_ref('data_source').save()
    @basepoint_set = false
    @button_selecting = false
    if @shading
      @shading.remove()
      @shading = null


  _start_drag2 : ->
    @eventSink.trigger("active_tool", @toolName)
    if not @dragging
      @dragging = true
      if not @button_activated
        @pan_button.addClass('active')
        
  _stop_drag2 : ->
    @basepoint_set = false
    if @dragging
      @dragging = false
      if not @button_activated
        @pan_button.removeClass('active')
      @eventSink.trigger("#{@options.eventBasename}:DragEnd")


class PanToolView_ extends Bokeh.PlotWidget

  initialize : (options) ->
    super(options)
