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

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,42 +2775,20 @@ 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');
if (appcontent.__treestyletab__resized) {
appcontent.__treestyletab__resized = false;
appcontent.style.margin = 0; 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;
b.removeAttribute(this.kAUTOHIDE); switch (this.getTreePref('tabbar.position'))
this.redrawContentArea();
}
},
cancelShowHideTabbar : function()
{
if (this.showHideTabbarTimer) {
window.clearTimeout(this.showHideTabbarTimer);
this.showHideTabbarTimer = null;
}
},
redrawContentArea : function(aDelayed)
{
var pos = this.getTreePref('tabbar.position');
// if (!aDelayed) {
var appcontent = document.getElementById('appcontent');
if (this.tabbarShown && !appcontent.__treestyletab__resized) {
switch (pos)
{ {
case 'left': case 'left':
appcontent.style.marginRight = '-'+this.tabbarWidth+'px'; appcontent.style.marginRight = '-'+this.tabbarWidth+'px';
@ -2829,11 +2803,22 @@ catch(e) {
appcontent.style.marginBottom = '-'+this.tabbarHeight+'px'; appcontent.style.marginBottom = '-'+this.tabbarHeight+'px';
break; break;
} }
appcontent.__treestyletab__resized = true; b.removeAttribute(this.kAUTOHIDE);
this.redrawContentArea();
} }
// window.setTimeout('TreeStyleTabService.redrawContentArea(true);', 100); },
// return;
// } cancelShowHideTabbar : function()
{
if (this.showHideTabbarTimer) {
window.clearTimeout(this.showHideTabbarTimer);
this.showHideTabbarTimer = null;
}
},
redrawContentArea : function()
{
var pos = this.getTreePref('tabbar.position');
try { try {
var v = this.browser.markupDocumentViewer; var v = this.browser.markupDocumentViewer;
if (this.tabbarShown) { if (this.tabbarShown) {