タブを開き直すときのための属性値はすべて最後にまとめて設定するようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4148 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
b865f7bf7d
commit
df47c50ca2
@ -1431,9 +1431,9 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
if (next)
|
if (next)
|
||||||
this.setTabValue(tab, this.kINSERT_BEFORE, next.getAttribute(this.kID));
|
this.setTabValue(tab, this.kINSERT_BEFORE, next.getAttribute(this.kID));
|
||||||
|
|
||||||
var backupChildren;
|
var backupAttributes = {};
|
||||||
if (firstChild) {
|
if (firstChild) {
|
||||||
backupChildren = this.getTabValue(tab, this.kCHILDREN);
|
backupAttributes[this.kCHILDREN] = this.getTabValue(tab, this.kCHILDREN);
|
||||||
let children = this.getChildTabs(tab);
|
let children = this.getChildTabs(tab);
|
||||||
children.forEach((
|
children.forEach((
|
||||||
closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_DETACH ?
|
closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_DETACH ?
|
||||||
@ -1476,10 +1476,10 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
do {
|
do {
|
||||||
ancestors.push(parentTab.getAttribute(this.kID));
|
ancestors.push(parentTab.getAttribute(this.kID));
|
||||||
if (!next && (next = this.getNextSiblingTab(parentTab)))
|
if (!next && (next = this.getNextSiblingTab(parentTab)))
|
||||||
this.setTabValue(tab, this.kINSERT_BEFORE, next.getAttribute(this.kID));
|
backupAttributes[this.kINSERT_BEFORE] = next.getAttribute(this.kID);
|
||||||
}
|
}
|
||||||
while (parentTab = this.getParentTab(parentTab));
|
while (parentTab = this.getParentTab(parentTab));
|
||||||
this.setTabValue(tab, this.kANCESTOR, ancestors.join('|'));
|
backupAttributes[this.kANCESTOR] = ancestors.join('|');
|
||||||
|
|
||||||
this.partTab(tab, true);
|
this.partTab(tab, true);
|
||||||
}
|
}
|
||||||
@ -1500,7 +1500,10 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
this.showTabbarForFeedback();
|
this.showTabbarForFeedback();
|
||||||
|
|
||||||
if (backupChildren) this.setTabValue(tab, this.kCHILDREN, backupChildren);
|
for (var i in backupAttributes)
|
||||||
|
{
|
||||||
|
this.setTabValue(tab, i, backupAttributes[i]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
CLOSE_PARENT_BEHAVIOR_ATTACH : 0,
|
CLOSE_PARENT_BEHAVIOR_ATTACH : 0,
|
||||||
CLOSE_PARENT_BEHAVIOR_DETACH : 1,
|
CLOSE_PARENT_BEHAVIOR_DETACH : 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user