グループを保持するように

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1847 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2008-02-23 01:42:42 +00:00
parent 8c3f6d7135
commit a6792472d2

View File

@ -1782,19 +1782,36 @@ TreeStyleTabBrowser.prototype = {
var self = this;
var draggedTabs = [aDraggedTab];
var draggedRoots = [aDraggedTab];
if ('MultipleTabService' in window &&
MultipleTabService.isSelected(aDraggedTab) &&
MultipleTabService.allowMoveMultipleTabs)
MultipleTabService.allowMoveMultipleTabs) {
draggedTabs = MultipleTabService.getSelectedTabs(b);
if (!(aInfo.action & this.kACTION_DUPLICATE)) {
draggedRoots = [];
draggedTabs.forEach(function(aTab) {
var parent = aTab,
current;
do {
current = parent;
parent = self.getParentTab(parent)
if (parent && MultipleTabService.isSelected(parent)) continue;
draggedRoots.push(current);
return;
}
while (parent);
});
}
}
if (aDraggedTab && aInfo.action & this.kACTION_PART) {
if (!(aInfo.action & this.kACTION_DUPLICATE))
this.partTabsOnDrop(draggedTabs);
this.partTabsOnDrop(draggedRoots);
}
else if (aInfo.action & this.kACTION_ATTACH) {
if (!(aInfo.action & this.kACTION_DUPLICATE))
this.attachTabsOnDrop(draggedTabs, aInfo.parent);
this.attachTabsOnDrop(draggedRoots, aInfo.parent);
}
else {
return false;