最上位の階層でも有効に

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4794 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-23 16:51:48 +00:00
parent 327933ecb7
commit 10dba4bbed

View File

@ -2274,10 +2274,10 @@ catch(e) {
var parent = this.getParentTab(aTabs[0]); var parent = this.getParentTab(aTabs[0]);
var prev = aTabs[0]; var next = aTabs[0];
while ( while (
(prev = this.getNextSiblingTab(prev)) && (next = this.getNextSiblingTab(next)) &&
aTabs.indexOf(prev) > -1 aTabs.indexOf(next) > -1
); );
window.setTimeout(function(aSelf) { window.setTimeout(function(aSelf) {
@ -2287,9 +2287,12 @@ catch(e) {
}, aSelf); }, aSelf);
if (parent) { if (parent) {
b.treeStyleTab.attachTabTo(root, parent, { b.treeStyleTab.attachTabTo(root, parent, {
insertBefore : prev insertBefore : next
}); });
} }
else if (next) {
b.treeStyleTab.moveTabSubTreeTo(root, next._tPos);
}
}, 0, this); }, 0, this);
}, },
canCreateSubTree : function(aTabs) canCreateSubTree : function(aTabs)