* 子タブの追加位置を最初の子にしている時は、タブの上にタブをドロップした時の追加位置もその設定に従うようにした
* タブの上にタブをドロップした時の挙動が全体的にバグってたのを修正 git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@3816 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
f02a620f41
commit
1ac3208ca2
@ -839,6 +839,14 @@ var TreeStyleTabService = {
|
|||||||
return lastChild;
|
return lastChild;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getLastDescendantTab : function(aTab)
|
||||||
|
{
|
||||||
|
if (!aTab) return null;
|
||||||
|
|
||||||
|
var tabs = this.getDescendantTabs(aTab);
|
||||||
|
return tabs.length ? tabs[tabs.length-1] : null ;
|
||||||
|
},
|
||||||
|
|
||||||
getChildIndex : function(aTab, aParent)
|
getChildIndex : function(aTab, aParent)
|
||||||
{
|
{
|
||||||
var parent = this.getParentTab(aTab);
|
var parent = this.getParentTab(aTab);
|
||||||
|
@ -2214,9 +2214,12 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
switch (info.position)
|
switch (info.position)
|
||||||
{
|
{
|
||||||
case this.kDROP_ON:
|
case this.kDROP_ON:
|
||||||
info.action = this.kACTION_MOVE | this.kACTION_ATTACH;
|
info.action = this.kACTION_STAY | this.kACTION_ATTACH;
|
||||||
info.parent = tab;
|
info.parent = tab;
|
||||||
info.insertBefore = this.getNextSiblingTab(tab) || this.getNextVisibleTab(tab);
|
var visible = this.getNextVisibleTab(tab);
|
||||||
|
info.insertBefore = this.getTreePref('insertNewChildAt') == this.kINSERT_FISRT ?
|
||||||
|
(this.getFirstChildTab(tab) || visible) :
|
||||||
|
(this.getNextSiblingTab(tab) || this.getNextTab(this.getLastDescendantTab(tab)) || visible);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case this.kDROP_BEFORE:
|
case this.kDROP_BEFORE:
|
||||||
|
@ -10,6 +10,7 @@ sv.hasChildTabs(tab)
|
|||||||
sv.getDescendantTabs(tab)
|
sv.getDescendantTabs(tab)
|
||||||
sv.getFirstChildTab(tab)
|
sv.getFirstChildTab(tab)
|
||||||
sv.getLastChildTab(tab)
|
sv.getLastChildTab(tab)
|
||||||
|
sv.getLastDescendantTab(tab)
|
||||||
sv.getChildIndex(tab, parent)
|
sv.getChildIndex(tab, parent)
|
||||||
|
|
||||||
sv.removeTabSubTree(tabs, onlychildren)
|
sv.removeTabSubTree(tabs, onlychildren)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user