内容領域の位置をずらす処理の場所を変えた

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1524 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2007-11-08 14:11:51 +00:00
parent 82463d0eae
commit 64be47ee7d

View File

@ -2727,11 +2727,7 @@ catch(e) {
appcontent.removeEventListener('mouseup', this, true); appcontent.removeEventListener('mouseup', this, true);
appcontent.removeEventListener('mousemove', this, true); appcontent.removeEventListener('mousemove', this, true);
if (appcontent.__treestyletab__resized) { appcontent.style.margin = 0;
appcontent.__treestyletab__resized = false;
appcontent.style.marginRight = 0;
appcontent.style.marginLeft = 0;
}
this.browser.removeAttribute(this.kAUTOHIDE); this.browser.removeAttribute(this.kAUTOHIDE);
}, },
@ -2779,22 +2775,34 @@ catch(e) {
{ {
window.setTimeout('TreeStyleTabService.checkTabsIndentOverflow(TreeStyleTabService.browser);', 0); window.setTimeout('TreeStyleTabService.checkTabsIndentOverflow(TreeStyleTabService.browser);', 0);
var b = this.browser; var b = this.browser;
var appcontent = document.getElementById('appcontent');
if (this.tabbarShown) { if (this.tabbarShown) {
this.tabbarShown = false; this.tabbarShown = false;
var splitter = document.getAnonymousElementByAttribute(b, 'class', this.kSPLITTER); var splitter = document.getAnonymousElementByAttribute(b, 'class', this.kSPLITTER);
this.tabbarHeight = b.mStrip.boxObject.height; this.tabbarHeight = b.mStrip.boxObject.height;
this.tabbarWidth = b.mStrip.boxObject.width + this.tabbarWidth = b.mStrip.boxObject.width +
(splitter ? splitter.boxObject.width : 0 ); (splitter ? splitter.boxObject.width : 0 );
var appcontent = document.getElementById('appcontent'); appcontent.style.margin = 0;
if (appcontent.__treestyletab__resized) {
appcontent.__treestyletab__resized = false;
appcontent.style.margin = 0;
}
b.setAttribute(this.kAUTOHIDE, true); b.setAttribute(this.kAUTOHIDE, true);
this.redrawContentArea(); this.redrawContentArea();
} }
else { else {
this.tabbarShown = true; this.tabbarShown = true;
switch (this.getTreePref('tabbar.position'))
{
case 'left':
appcontent.style.marginRight = '-'+this.tabbarWidth+'px';
break;
case 'right':
appcontent.style.marginLeft = '-'+this.tabbarWidth+'px';
break;
case 'bottom':
appcontent.style.marginTop = '-'+this.tabbarHeight+'px';
break;
default:
appcontent.style.marginBottom = '-'+this.tabbarHeight+'px';
break;
}
b.removeAttribute(this.kAUTOHIDE); b.removeAttribute(this.kAUTOHIDE);
this.redrawContentArea(); this.redrawContentArea();
} }
@ -2808,32 +2816,9 @@ catch(e) {
} }
}, },
redrawContentArea : function(aDelayed) redrawContentArea : function()
{ {
var pos = this.getTreePref('tabbar.position'); var pos = this.getTreePref('tabbar.position');
// if (!aDelayed) {
var appcontent = document.getElementById('appcontent');
if (this.tabbarShown && !appcontent.__treestyletab__resized) {
switch (pos)
{
case 'left':
appcontent.style.marginRight = '-'+this.tabbarWidth+'px';
break;
case 'right':
appcontent.style.marginLeft = '-'+this.tabbarWidth+'px';
break;
case 'bottom':
appcontent.style.marginTop = '-'+this.tabbarHeight+'px';
break;
default:
appcontent.style.marginBottom = '-'+this.tabbarHeight+'px';
break;
}
appcontent.__treestyletab__resized = true;
}
// window.setTimeout('TreeStyleTabService.redrawContentArea(true);', 100);
// return;
// }
try { try {
var v = this.browser.markupDocumentViewer; var v = this.browser.markupDocumentViewer;
if (this.tabbarShown) { if (this.tabbarShown) {