pinned属性があれば、値に関係無しにpinned==trueと見なす

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7163 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-09-09 09:37:12 +00:00
parent 0face49c4a
commit 1be5fe77e6
2 changed files with 8 additions and 6 deletions

View File

@ -128,7 +128,7 @@ TreeStyleTabBrowser.prototype = {
isTabInViewport : function TSTBrowser_isTabInViewport(aTab)
{
if (!aTab) return false;
if (aTab.getAttribute('pinned') == 'true')
if (aTab.hasAttribute('pinned'))
return true;
var tabBox = aTab.boxObject;
var barBox = this.scrollBox.boxObject;
@ -164,6 +164,8 @@ TreeStyleTabBrowser.prototype = {
style.MozMarginStart = '';
style.setProperty('margin-left', (width * col)+'px', 'important');
style.setProperty('margin-top', (- height * (maxRow - row))+'px', 'important');
style.top = '';
style.left = '';
col++;
if (col >= maxCol) {
col = 0;
@ -3312,8 +3314,8 @@ TreeStyleTabBrowser.prototype = {
info.target = tab;
}
var positionProp = this.isVertical && tab.getAttribute('pinned') == 'true' ? this.invertedPositionProp : this.positionProp ;
var sizeProp = this.isVertical && tab.getAttribute('pinned') == 'true' ? this.invertedSizeProp : this.sizeProp ;
var positionProp = this.isVertical && tab.hasAttribute('pinned') ? this.invertedPositionProp : this.positionProp ;
var sizeProp = this.isVertical && tab.hasAttribute('pinned') ? this.invertedSizeProp : this.sizeProp ;
var boxPos = tab.boxObject[positionProp];
var boxUnit = Math.round(tab.boxObject[sizeProp] / 3);
if (aEvent[positionProp] < boxPos + boxUnit) {
@ -3743,8 +3745,8 @@ TreeStyleTabBrowser.prototype = {
!aParent ||
aChild == aParent ||
(currentParent = this.getParentTab(aChild)) == aParent ||
aChild.getAttribute('pinned') == 'true' ||
aParent.getAttribute('pinned') == 'true'
aChild.hasAttribute('pinned') ||
aParent.hasAttribute('pinned')
) {
this.fireAttachedEvent(aChild, aParent);
return;

View File

@ -1142,7 +1142,7 @@ var TreeStyleTabUtils = {
var ownerBrowser = this.getTabBrowserFromFrame(frame);
var parentTab = this.getTabFromFrame(frame, ownerBrowser);
if (parentTab.getAttribute('pinned') == 'true')
if (parentTab.hasAttribute('pinned'))
return;
ownerBrowser.treeStyleTab.ensureTabInitialized(parentTab);