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:20 UTC
[1/2] git commit: [flex-asjs] [refs/heads/develop] - UIBase was not
dispatching width and height change notifications like its ActionScript
counterpart.
Repository: flex-asjs
Updated Branches:
refs/heads/develop 05bc63297 -> 7018bce41
UIBase was not dispatching width and height change notifications like its ActionScript counterpart.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ce2c8b14
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ce2c8b14
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ce2c8b14
Branch: refs/heads/develop
Commit: ce2c8b14926901d03eb9786989966723c3fee7a8
Parents: 05bc632
Author: Peter Ent <pe...@apache.org>
Authored: Mon Apr 14 15:35:50 2014 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Apr 14 15:35:50 2014 -0400
----------------------------------------------------------------------
frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce2c8b14/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index 0f11748..41b9073 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -80,6 +80,7 @@ org.apache.flex.core.UIBase.prototype.createElement = function() {
this.element = document.createElement('div');
if (this.positioner == null)
this.positioner = this.element;
+ this.positioner.style.display = 'block';
this.element['flexjs_wrapper'] = this;
@@ -324,6 +325,7 @@ org.apache.flex.core.UIBase.prototype.get_y = function() {
*/
org.apache.flex.core.UIBase.prototype.set_width = function(pixels) {
this.positioner.style.width = pixels.toString() + 'px';
+ this.dispatchEvent('widthChanged');
};
@@ -344,6 +346,7 @@ org.apache.flex.core.UIBase.prototype.get_width = function() {
*/
org.apache.flex.core.UIBase.prototype.set_height = function(pixels) {
this.positioner.style.height = pixels.toString() + 'px';
+ this.dispatchEvent('heightChanged');
};
[2/2] git commit: [flex-asjs] [refs/heads/develop] - Listens for and
handles size changes in the strand.
Posted by pe...@apache.org.
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';