Minefield 4.0b4preで新規タブのインデントの増減がアニメーションされていなかった
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7066 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
b100d53b2e
commit
aa976f57bd
@ -4031,25 +4031,42 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
var regexp = this.indentRulesRegExp;
|
var regexp = this.indentRulesRegExp;
|
||||||
var property = this.indentProp+'-'+aTarget;
|
var property = this.indentProp+'-'+aTarget;
|
||||||
var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style);
|
|
||||||
if (
|
if (
|
||||||
!this.animationEnabled ||
|
!this.animationEnabled ||
|
||||||
aJustNow ||
|
aJustNow ||
|
||||||
this.indentDuration < 1 ||
|
this.indentDuration < 1 ||
|
||||||
!aTarget ||
|
!aTarget ||
|
||||||
CSSTransitionEnabled ||
|
|
||||||
this.isCollapsed(aTab)
|
this.isCollapsed(aTab)
|
||||||
) {
|
) {
|
||||||
aTab.setAttribute(
|
aTab.setAttribute(
|
||||||
'style',
|
'style',
|
||||||
aTab.getAttribute('style')
|
aTab.getAttribute('style')
|
||||||
.replace(regexp, '')+';'+
|
.replace(regexp, '')+';'+
|
||||||
(aTarget || CSSTransitionEnabled ? property+':'+aIndent+'px !important;' : '' )
|
(aTarget ? property+':'+aIndent+'px !important;' : '' )
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var startIndent = this.getPropertyPixelValue(aTab, property);
|
var startIndent = this.getPropertyPixelValue(aTab, property);
|
||||||
|
|
||||||
|
var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style);
|
||||||
|
if (CSSTransitionEnabled) {
|
||||||
|
aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) {
|
||||||
|
aTab.setAttribute(
|
||||||
|
'style',
|
||||||
|
aTab.getAttribute('style')
|
||||||
|
.replace(regexp, '')+';'+
|
||||||
|
property+':'+aIndent+'px !important;'
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
this.animationManager.addTask(
|
||||||
|
aTab.__treestyletab__updateTabIndentTask,
|
||||||
|
0, 0, 1
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var delta = aIndent - startIndent;
|
var delta = aIndent - startIndent;
|
||||||
var radian = 90 * Math.PI / 180;
|
var radian = 90 * Math.PI / 180;
|
||||||
var self = this;
|
var self = this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user