self.move_left)
self._range = (r0, r1)
def move_left(self, event):
if self.buttonDown is False or self.ignore(event):
return
x = self._get_mouse_position(event)
if self.step_ax is not None:
if (self.bounds_check and
x < self.step_ax.low_value - self.step_ax.scale):
return
if self.snap_position:
snap_offset = self.step_ax.offset - 0.5 * self.step_ax.scale
elif self.snap_size:
snap_offset = self._range[1]
if self.snap_position or self.snap_size:
rem = (x - snap_offset) % self.step_ax.scale
if rem / self.step_ax.scale < 0.5:
rem = -rem
else:
rem = self.step_ax.scale - rem
x += rem
// Do not move the left edge beyond the right one.
if x >= self._range[1]:
if self.can_switch and x > self._range[1]:
self.switch_left_right(x, True)
self.move_right(event)
return
width_increment = self._range[0] - x
if self._get_span_width() + width_increment <= 0:
return
self._set_span_x(x)
self.rect.set_width(self._get_span_width() + width_increment)
self.update_range()
self.events.moved.trigger(self)
self.events.resized.trigger(self)