parameters: (self, item, fun, num=1, add=None)
docstring: Bind fun to mouse-move-event (with pressed mouse button) on turtle.
          fun must be a function with two arguments, the coordinates of the
          actual mouse position on the canvas.
          num, the number of the mouse-button defaults to 1
  
          Every sequence of mouse-move-events on a turtle is preceded by a
          mouse-click event on that turtle.
docstring_summary: Bind fun to mouse-move-event (with pressed mouse button) on turtle.
          fun must be a function with two arguments, the coordinates of the
          actual mouse position on the canvas.
          num, the number of the mouse-button defaults to 1
docstring_tokens: Bind fun to mouse - move - event ( with pressed mouse button ) on turtle . fun must be a function with two arguments the coordinates of the actual mouse position on the canvas . num the number of the mouse - button defaults to 1
function: def _ondrag(self, item, fun, num=1, add=None):
          """Bind fun to mouse-move-event (with pressed mouse button) on turtle.
          fun must be a function with two arguments, the coordinates of the
          actual mouse position on the canvas.
          num, the number of the mouse-button defaults to 1
  
          Every sequence of mouse-move-events on a turtle is preceded by a
          mouse-click event on that turtle.
          """
          if fun is None:
              self.cv.tag_unbind(item, "<Button%s-Motion>" % num)
          else:
              def eventfun(event):
                  try:
                      x, y = (self.cv.canvasx(event.x)/self.xscale,
                             -self.cv.canvasy(event.y)/self.yscale)
                      fun(x, y)
                  except Exception:
                      pass
              self.cv.tag_bind(item, "<Button%s-Motion>" % num, eventfun, add)
function_tokens: def _ondrag ( self , item , fun , num = 1 , add = None ) : if fun is None : self . cv . tag_unbind ( item , "<Button%s-Motion>" % num ) else : def eventfun ( event ) : try : x , y = ( self . cv . canvasx ( event . x ) / self . xscale , - self . cv . canvasy ( event . y ) / self . yscale ) fun ( x , y ) except Exception : pass self . cv . tag_bind ( item , "<Button%s-Motion>" % num , eventfun , add )