def ButtonUp(self, p, button, state): if self.state & AlternateMask: p = self.apply_constraint(p, state) self.DragStop(p) off = 2 * self.off end = self.trafo.offset() - self.off self.trafo = Trafo(off.x, 0, 0, off.y, end.x, end.y) else: RectangularCreator.ButtonUp(self, p, button, state)
def MouseMove(self, p, state): self.state = state RectangularCreator.MouseMove(self, p, state)