アニメーション効果を少し変更
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4074 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
37f28b5a0a
commit
9ed3acc932
@ -2824,7 +2824,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
var power = Math.min(1, (Date.now() - startTime) / delay);
|
var power = Math.min(1, (Date.now() - startTime) / delay);
|
||||||
var indent = (power == 1) ?
|
var indent = (power == 1) ?
|
||||||
aIndent :
|
aIndent :
|
||||||
startIndent + (delta * Math.sin(power * 90 * Math.PI / 180));
|
startIndent + (delta * Math.sin(((power * 120)-30) * Math.PI / 180));
|
||||||
aTab.setAttribute(
|
aTab.setAttribute(
|
||||||
'style',
|
'style',
|
||||||
aTab.getAttribute('style')
|
aTab.getAttribute('style')
|
||||||
@ -3088,7 +3088,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
aTab.__treestyletab__updateTabCollapsedTimer = window.setInterval(function(aSelf) {
|
aTab.__treestyletab__updateTabCollapsedTimer = window.setInterval(function(aSelf) {
|
||||||
var power = Math.min(1, (Date.now() - startTime) / delay);
|
var power = Math.min(1, (Date.now() - startTime) / delay);
|
||||||
var powerForStyle = Math.sin(power * 90 * Math.PI / 180);
|
var powerForStyle = Math.sin(((power * 120)-30) * Math.PI / 180);
|
||||||
var margin = (power == 1) ?
|
var margin = (power == 1) ?
|
||||||
endMargin :
|
endMargin :
|
||||||
startMargin + (deltaMargin * powerForStyle);
|
startMargin + (deltaMargin * powerForStyle);
|
||||||
|
Loading…
Reference in New Issue
Block a user