def onmove(self, event):
if self.pressv is None or self.ignore(event): return<EOL>x, y = event.xdata, event.ydata<EOL>self.prev = x, y<EOL>if self.direction == '<STR_LIT>':<EOL><INDENT>v = x<EOL><DEDENT>else:<EOL><INDENT>v = y<EOL><DEDENT>minv, maxv = v, self.pressv<EOL>if minv>maxv: minv, maxv = maxv, minv<EOL>if self.direction == '<STR_LIT>':<EOL><INDENT>self.rect.set_x(minv)<EOL>self.rect.set_width(maxv-minv)<EOL><DEDENT>else:<EOL><INDENT>self.rect.set_y(minv)<EOL>self.rect.set_height(maxv-minv)<EOL><DEDENT>if self.onmove_callback is not None:<EOL><INDENT>vmin = self.pressv<EOL>if self.direction == '<STR_LIT>':<EOL><INDENT>vmax = event.xdata or self.prev[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>vmax = event.ydata or self.prev[<NUM_LIT:1>]<EOL><DEDENT>if vmin>vmax: vmin, vmax = vmax, vmin<EOL>self.onmove_callback(vmin, vmax)<EOL><DEDENT>self.update()<EOL>return False<EOL>
on motion notify event