       @draglock = undefined
 
     _onMouseDown: (e) ->
-      [mouseX,mouseY]= getMouseCoords e
+      [mouseX,mouseY]= @getMouseCoords e
 
       unless @checkForEvents mouseX,mouseY
         @pauseEvent e

      #  @rect = @canvas.getBoundingClientRect()
      @draglock = undefined

      [mouseX,mouseY]= getMouseCoords e

      @moveCenter mouseX,mouseY
      @zoomCanvas @dblClickVx,@dblClickVy


      # zoom control
      @ctx.fillStyle = "red"
      @ctx.globalAlpha = 0.5;
      @ctx.fillRect @canvas.width - 40, @canvas.height - 35,15,15
      callback = -> alert "hi"
      @events.zoomIn = [@canvas.width - 40, @canvas.height - 35,@canvas.width -
      25,@canvas.height - 20,callback]
      @ctx.globalAlpha = 1

      @ctx.fillStyle = "blue"
      @ctx.fillRect @canvas.width - 40, @canvas.height - 20,15,15
