def on_update(self): if self._animation: # animate transition to the nearest cover. # XXX fix that same as kinetic. But kinetic algo suck right now. self._transition = interpolate(self._transition, round(self._transition), 5) # update also internal position, otherwise, we have a bug when # selecting again a cover self._internal_position = (self.selection + self._transition) * self.cover_distance self._calculate_coords() super(MTCoverFlow, self).on_update()
def on_update(self): self.widget.pos = interpolate(self.widget.pos, self.pos) self.size = interpolate(self.size, self.widget.size) super(MyDragableContainer, self).on_update()