currentTabbarPositionにsetterを定義し、そちらを正式とした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5560 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
a571208959
commit
7dbac04c5d
@ -448,19 +448,26 @@ var TreeStyleTabService = {
|
|||||||
this.setTreePref('enableSubtreeIndent.horizontal', !this.getTreePref(pref));
|
this.setTreePref('enableSubtreeIndent.horizontal', !this.getTreePref(pref));
|
||||||
},
|
},
|
||||||
|
|
||||||
changeTabbarPosition : function(aNewPosition) /* PUBLIC API */
|
changeTabbarPosition : function(aNewPosition) /* PUBLIC API (obsolete, for backward compatibility) */
|
||||||
{
|
{
|
||||||
if (!aNewPosition || !/^(top|bottom|left|right)$/i.test(aNewPosition))
|
this.currentTabbarPosition = aNewPosition;
|
||||||
aNewPosition = 'top';
|
|
||||||
|
|
||||||
aNewPosition = aNewPosition.toLowerCase();
|
|
||||||
this.setTreePref('tabbar.position', aNewPosition);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
get currentTabbarPosition() /* PUBLIC API */
|
get currentTabbarPosition() /* PUBLIC API */
|
||||||
{
|
{
|
||||||
return this.getTreePref('tabbar.position') || 'top';
|
return this.getTreePref('tabbar.position') || 'top';
|
||||||
},
|
},
|
||||||
|
set currentTabbarPosition(aValue)
|
||||||
|
{
|
||||||
|
var position = String(aValue);
|
||||||
|
if (!position || !/^(top|bottom|left|right)$/i.test(position))
|
||||||
|
position = 'top';
|
||||||
|
|
||||||
|
position = position.toLowerCase();
|
||||||
|
this.setTreePref('tabbar.position', position);
|
||||||
|
|
||||||
|
return aValue;
|
||||||
|
},
|
||||||
|
|
||||||
/* backward compatibility */
|
/* backward compatibility */
|
||||||
getTempTreeStyleTab : function(aTabBrowser)
|
getTempTreeStyleTab : function(aTabBrowser)
|
||||||
|
@ -34,7 +34,7 @@ TreeStyleTabBrowserTabpanelDNDObserver.prototype = {
|
|||||||
let orient = (position == 'left' || position == 'right') ? 'vertical' : 'horizontal' ;
|
let orient = (position == 'left' || position == 'right') ? 'vertical' : 'horizontal' ;
|
||||||
sv.setTreePref('tabbar.fixed.'+orient, false);
|
sv.setTreePref('tabbar.fixed.'+orient, false);
|
||||||
}
|
}
|
||||||
sv.changeTabbarPosition(position);
|
sv.currentTabbarPosition = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user