Implement the transition between zoom view.
This commit is contained in:
@@ -39,6 +39,10 @@ class Animator(gobject.GObject):
|
||||
def add(self, animation):
|
||||
self._animations.append(animation)
|
||||
|
||||
def remove_all(self):
|
||||
self.stop()
|
||||
self._animations = []
|
||||
|
||||
def start(self):
|
||||
if self._timeout_sid:
|
||||
self.stop()
|
||||
@@ -51,7 +55,7 @@ class Animator(gobject.GObject):
|
||||
if self._timeout_sid:
|
||||
gobject.source_remove(self._timeout_sid)
|
||||
self._timeout_sid = 0
|
||||
self.emit('completed')
|
||||
self.emit('completed')
|
||||
|
||||
def _next_frame_cb(self):
|
||||
current_time = min(self._time, time.time() - self._start_time)
|
||||
|
||||
Reference in New Issue
Block a user