タブが横置きに変更された時、動的にタブの設定を元に戻すようにした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1332 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2007-10-24 17:54:40 +00:00
parent ee028df593
commit 68e1c0145d

View File

@ -2537,6 +2537,15 @@ TreeStyleTabBrowserObserver.prototype = {
switch (aData) switch (aData)
{ {
case 'extensions.treestyletab.tabbar.position': case 'extensions.treestyletab.tabbar.position':
if (value == 'bottom' ||
(value != 'left' && value != 'right')) {
var container = this.mTabBrowser.mTabContainer;
Array.prototype.slice.call(container.childNodes).forEach(function(aTab) {
aTab.removeAttribute('align');
aTab.maxWidth = 250;
aTab.minWidth = container.mTabMinWidth;
});
}
case 'extensions.treestyletab.tabbar.invertUI': case 'extensions.treestyletab.tabbar.invertUI':
TreeStyleTabService.initTabbar(this.mTabBrowser); TreeStyleTabService.initTabbar(this.mTabBrowser);
TreeStyleTabService.updateAllTabsIndent(this.mTabBrowser); TreeStyleTabService.updateAllTabsIndent(this.mTabBrowser);