From eacfbbe4de3a5f9308896af375deafdea3336686 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 10 Apr 2009 01:35:01 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=96=E3=83=A9=E3=83=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4110 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/res/animationManager.js | 23 +++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/content/treestyletab/res/animationManager.js b/content/treestyletab/res/animationManager.js index b6f2b1b3..260a2cf5 100644 --- a/content/treestyletab/res/animationManager.js +++ b/content/treestyletab/res/animationManager.js @@ -15,6 +15,8 @@ ); // stop all window['piro.sakura.ne.jp'].animationManager.stop(); + // restart after doing something + window['piro.sakura.ne.jp'].animationManager.start(); lisence: The MIT License, Copyright (c) 2009 SHIMODA "Piro" Hiroshi http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/license.txt @@ -22,7 +24,7 @@ http://www.cozmixng.org/repos/piro/fx3-compatibility-lib/trunk/animationManager.js */ (function() { - const currentRevision = 4; + const currentRevision = 5; if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {}; @@ -53,13 +55,8 @@ change : aTotalChange, duration : aDuration }); - if (this.tasks.length > 1) return; - this.stop(); - this.timer = window.setInterval( - this.onAnimation, - this.interval, - this - ); + if (this.tasks.length == 1) + this.start(); }, removeTask : function(aTask) @@ -82,6 +79,16 @@ this.stop(); }, + start : function() + { + this.stop(); + this.timer = window.setInterval( + this.onAnimation, + this.interval, + this + ); + }, + stop : function() { if (!this.timer) return;