アニメーション効果の開始タイミングを変更
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4149 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
df47c50ca2
commit
d3d440cd39
@ -1432,6 +1432,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.setTabValue(tab, this.kINSERT_BEFORE, next.getAttribute(this.kID));
|
this.setTabValue(tab, this.kINSERT_BEFORE, next.getAttribute(this.kID));
|
||||||
|
|
||||||
var backupAttributes = {};
|
var backupAttributes = {};
|
||||||
|
var indentModifiedTabs = [];
|
||||||
|
|
||||||
if (firstChild) {
|
if (firstChild) {
|
||||||
backupAttributes[this.kCHILDREN] = this.getTabValue(tab, this.kCHILDREN);
|
backupAttributes[this.kCHILDREN] = this.getTabValue(tab, this.kCHILDREN);
|
||||||
let children = this.getChildTabs(tab);
|
let children = this.getChildTabs(tab);
|
||||||
@ -1453,12 +1455,10 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.partTab(aTab, true);
|
this.partTab(aTab, true);
|
||||||
}
|
}
|
||||||
), this);
|
), this);
|
||||||
this.updateTabsIndent(children);
|
indentModifiedTabs = indentModifiedTabs.concat(children);
|
||||||
this.checkTabsIndentOverflow();
|
if (closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_ATTACH)
|
||||||
if (closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_ATTACH) {
|
|
||||||
nextFocusedTab = firstChild;
|
nextFocusedTab = firstChild;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (parentTab) {
|
if (parentTab) {
|
||||||
let firstSibling = this.getFirstChildTab(parentTab);
|
let firstSibling = this.getFirstChildTab(parentTab);
|
||||||
@ -1496,8 +1496,9 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
)
|
)
|
||||||
b.selectedTab = nextFocusedTab;
|
b.selectedTab = nextFocusedTab;
|
||||||
|
|
||||||
|
if (indentModifiedTabs.length)
|
||||||
|
this.updateTabsIndentWithDelay(indentModifiedTabs);
|
||||||
this.checkTabsIndentOverflow();
|
this.checkTabsIndentOverflow();
|
||||||
|
|
||||||
this.showTabbarForFeedback();
|
this.showTabbarForFeedback();
|
||||||
|
|
||||||
for (var i in backupAttributes)
|
for (var i in backupAttributes)
|
||||||
@ -2795,6 +2796,23 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.updateTabsIndent(this.getChildTabs(aTab), aLevel+1, aProp);
|
this.updateTabsIndent(this.getChildTabs(aTab), aLevel+1, aProp);
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
updateTabsIndentWithDelay : function()
|
||||||
|
{
|
||||||
|
if (this.updateTabsIndentWithDelayTimer)
|
||||||
|
window.clearTimeout(this.updateTabsIndentWithDelayTimer);
|
||||||
|
|
||||||
|
this.updateTabsIndentWithDelayTasks.push(Array.slice(arguments));
|
||||||
|
|
||||||
|
this.updateTabsIndentWithDelayTimer = window.setTimeout(function(aSelf) {
|
||||||
|
aSelf.updateTabsIndentWithDelayTasks.forEach(function(aTask) {
|
||||||
|
aSelf.updateTabsIndent.apply(aSelf, aTask);
|
||||||
|
}, aSelf);
|
||||||
|
window.clearTimeout(aSelf.updateTabsIndentWithDelayTimer);
|
||||||
|
aSelf.updateTabsIndentWithDelayTimer = null;
|
||||||
|
}, 0, this);
|
||||||
|
},
|
||||||
|
updateTabsIndentWithDelayTasks : [],
|
||||||
|
updateTabsIndentWithDelayTimer : null,
|
||||||
|
|
||||||
updateTabIndent : function(aTab, aProp, aIndent, aJustNow)
|
updateTabIndent : function(aTab, aProp, aIndent, aJustNow)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user