flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [7/7] git commit: [flex-asjs] [refs/heads/develop] - listen for more than just sizeChanged. When one dimension is locked down and the other isn't, some fancy layout may not send a sizeChanged
Date Fri, 28 Aug 2015 05:56:57 GMT
listen for more than just sizeChanged.  When one dimension is locked down and the other isn't,
some fancy layout may not send a sizeChanged


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/417fc3cf
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/417fc3cf
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/417fc3cf

Branch: refs/heads/develop
Commit: 417fc3cff64e7daa6833482bc26582ba9d4fed7e
Parents: 4dbb402
Author: Alex Harui <aharui@apache.org>
Authored: Thu Aug 27 22:55:14 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Aug 27 22:55:14 2015 -0700

----------------------------------------------------------------------
 .../HTML/as/src/org/apache/flex/html/beads/ContainerView.as  | 6 +++++-
 .../HTML/js/src/org/apache/flex/html/beads/ContainerView.js  | 8 ++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/417fc3cf/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
index e3b6a1e..09aac8f 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ContainerView.as
@@ -191,6 +191,8 @@ package org.apache.flex.html.beads
 			else {
 				// otherwise, wait until the unknown sizes have been set and then finish
 				host.addEventListener("sizeChanged", deferredSizeHandler);
+                host.addEventListener("widthChanged", deferredSizeHandler);
+                host.addEventListener("heightChanged", deferredSizeHandler);
 			}
 		}
 		
@@ -205,7 +207,9 @@ package org.apache.flex.html.beads
 		 */
 		private function deferredSizeHandler(event:Event):void
 		{
-			host.removeEventListener(event.type, deferredSizeHandler);
+            host.removeEventListener("sizeChanged", deferredSizeHandler);
+            host.removeEventListener("widthChanged", deferredSizeHandler);
+            host.removeEventListener("heightChanged", deferredSizeHandler);
 			completeSetup();
 			
 			var num:Number = contentView.numElements;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/417fc3cf/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
index 91a7e51..6e60e27 100644
--- a/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
+++ b/frameworks/projects/HTML/js/src/org/apache/flex/html/beads/ContainerView.js
@@ -99,6 +99,10 @@ org.apache.flex.html.beads.ContainerView.
    else {
      this._strand.addEventListener('sizeChanged',
        org.apache.flex.utils.Language.closure(this.deferredSizeHandler, this, 'deferredSizeHandler'));
+     this._strand.addEventListener('widthChanged',
+       org.apache.flex.utils.Language.closure(this.deferredSizeHandler, this, 'deferredSizeHandler'));
+     this._strand.addEventListener('heightChanged',
+       org.apache.flex.utils.Language.closure(this.deferredSizeHandler, this, 'deferredSizeHandler'));
    }
 };
 
@@ -110,6 +114,10 @@ org.apache.flex.html.beads.ContainerView.
     prototype.deferredSizeHandler = function(event) {
     this._strand.removeEventListener('sizeChanged',
       org.apache.flex.utils.Language.closure(this.deferredSizeHandler, this, 'deferredSizeHandler'));
+    this._strand.removeEventListener('widthChanged',
+      org.apache.flex.utils.Language.closure(this.deferredSizeHandler, this, 'deferredSizeHandler'));
+    this._strand.removeEventListener('heightChanged',
+      org.apache.flex.utils.Language.closure(this.deferredSizeHandler, this, 'deferredSizeHandler'));
     this.completeSetup();
 
     var num = this.contentView.numElements;


Mime
View raw message