You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2014/04/14 21:38:21 UTC
[2/2] git commit: [flex-asjs] [refs/heads/develop] - Listens for and
handles size changes in the strand.
Listens for and handles size changes in the strand.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7018bce4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7018bce4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7018bce4
Branch: refs/heads/develop
Commit: 7018bce41054f6df6ddbd1fedbf28ab0b76aebbc
Parents: ce2c8b1
Author: Peter Ent <pe...@apache.org>
Authored: Mon Apr 14 15:36:23 2014 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Apr 14 15:36:23 2014 -0400
----------------------------------------------------------------------
.../src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7018bce4/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
index 57fe07d..5d3ee28 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/ButtonBarLayout.js
@@ -76,6 +76,10 @@ org.apache.flex.html.beads.layouts.ButtonBarLayout.
goog.bind(this.changeHandler, this));
this.strand_.addEventListener('itemsCreated',
goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('widthChanged',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('heightChanged',
+ goog.bind(this.changeHandler, this));
this.strand_.element.style.display = 'block';
}
};
@@ -98,7 +102,7 @@ org.apache.flex.html.beads.layouts.ButtonBarLayout.
for (i = 0; i < n; i++)
{
children[i].set_height(useHeight);
- if (this.buttonWidths_) children[i].set_width(this.buttonWidths_[i]);
+ if (this.buttonWidths_ && !isNaN(this.buttonWidths_[i])) children[i].set_width(this.buttonWidths_[i]);
else children[i].set_width(useWidth);
children[i].element.style['vertical-align'] = 'middle';
children[i].element.style['text-align'] = 'center';