From dfa9733bf4ce3eba0a9fdaed703557e3bc6a1a8c Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 8 Apr 2009 10:11:37 +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@4085 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/res/animationManager.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/content/treestyletab/res/animationManager.js b/content/treestyletab/res/animationManager.js index cdaa196c..e15cb126 100644 --- a/content/treestyletab/res/animationManager.js +++ b/content/treestyletab/res/animationManager.js @@ -2,10 +2,17 @@ Animation Task Manager Usage: - window['piro.sakura.ne.jp'].animationManager.task(function() { - // some animation task runned by interval - return isFinish; // boolean - }); + window['piro.sakura.ne.jp'].animationManager.addTask( + function(aTime, aBeginningValue, aFinishValue, aDelay) { + // some animation task runned by interval + var current = someEasingFunction(aTime, aBeginningValue, aFinishValue, aDelay); + target.style.left = current+'px'; + return aTime > aDelay; // return true if the animation finished. + }, + 100, // beginning + 200, // finish + 250 // msec + ); // stop all window['piro.sakura.ne.jp'].animationManager.stop();