Skip to content

Commit

Permalink
bug fix: get root toolbar status when deciding how to size a child to…
Browse files Browse the repository at this point in the history
…olbar
  • Loading branch information
dound committed Dec 7, 2008
1 parent d3510f9 commit 86cd606
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions jtoolbar.js
Expand Up @@ -542,8 +542,9 @@ var JTB = function() {
var isFloat;

if(this.tb !== null) {
orient = this.tb.getOrientation();
isFloat = this.tb.isFloating();
var rt = this.tb.getRootToolbar();
orient = rt.getOrientation();
isFloat = rt.isFloating();
}
else {
orient = null;
Expand Down Expand Up @@ -771,6 +772,15 @@ var JTB = function() {
this.tb_parent = tb;
return this;
};

JTB.Toolbar.prototype.getRootToolbar = function () {
if(this.tb_parent === null) {
return this;
}
else {
return this.tb_parent.getRootToolbar();
}
};

/** get the name of the element the toolbar is attached to (may be null) */
JTB.Toolbar.prototype.getContentName = function() {
Expand Down

0 comments on commit 86cd606

Please sign in to comment.