flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [27/41] git commit: [flex-asjs] [refs/heads/core_js_to_as] - Stop DataGridView from resizing if the size of the strand is 0x0.
Date Fri, 20 Nov 2015 20:19:16 GMT
Stop DataGridView from resizing if the size of the strand is 0x0.


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

Branch: refs/heads/core_js_to_as
Commit: 866d5e44f5d5fa4e125af922dd2edcd5ce25f386
Parents: 820ae80
Author: Peter Ent <pent@apache.org>
Authored: Wed Oct 21 15:41:36 2015 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed Oct 21 15:41:36 2015 -0400

----------------------------------------------------------------------
 .../src/org/apache/flex/html/beads/DataGridView.as | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/866d5e44/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/DataGridView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/DataGridView.as
b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/DataGridView.as
index 7f220e9..e06f569 100644
--- a/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/DataGridView.as
+++ b/frameworks/projects/HTML/asjs/src/org/apache/flex/html/beads/DataGridView.as
@@ -166,15 +166,26 @@ package org.apache.flex.html.beads
 		 */
 		private function handleSizeChanges(event:Event):void
 		{
+			var useWidth:Number = _listArea.width;
+			var useHeight:Number = _listArea.height;
+			
+			if (host.width > 0) {
+				useWidth = host.width;
+			}
+			
 			_header.x = 0;
 			_header.y = 0;
-			_header.width = host.width;
+			_header.width = useWidth;
 			_header.height = 25;
 			
+			if (host.height > 0) {
+				useHeight = host.height - _header.height;
+			}
+			
 			_listArea.x = 0;
 			_listArea.y = 26;
-			_listArea.width = host.width;
-			_listArea.height = host.height - _header.height;
+			_listArea.width = useWidth;
+			_listArea.height = useHeight;
 			
 			var sharedModel:IDataGridModel = _strand.getBeadByType(IBeadModel) as IDataGridModel;
 			


Mime
View raw message