flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [09/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - get rid of background Sprite. Draw directly in the renderer sprite. Otherwise the sprite will be seen by layout and isn't an layout child
Date Tue, 23 May 2017 07:16:17 GMT
get rid of background Sprite.  Draw directly in the renderer sprite.  Otherwise the sprite
will be seen by layout and isn't an layout child


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

Branch: refs/heads/release0.8.0
Commit: 198ab8ad994a57f9763f92c02fd225a347e3a240
Parents: 6832946
Author: Alex Harui <aharui@apache.org>
Authored: Sun May 21 23:29:12 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue May 23 00:15:56 2017 -0700

----------------------------------------------------------------------
 .../html/supportClasses/DataItemRenderer.as     | 22 ++++----------------
 1 file changed, 4 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/198ab8ad/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
index 7154689..c1da93c 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
@@ -111,23 +111,9 @@ package org.apache.flex.html.supportClasses
 			_dataField = value;
 		}
 
-		COMPILE::SWF
-		private var background:Sprite;
-
 		COMPILE::JS
 		private var controller:ItemRendererMouseController;
 
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		override public function addedToParent():void
-		{
-			super.addedToParent();
-
-			background = new Sprite();
-			addChild(background);
-		}
 
 		/**
 		 * @private
@@ -138,10 +124,10 @@ package org.apache.flex.html.supportClasses
 			{
 				super.updateRenderer();
 
-				background.graphics.clear();
-				background.graphics.beginFill(useColor, (down||selected||hovered)?1:0);
-				background.graphics.drawRect(0, 0, width, height);
-				background.graphics.endFill();
+				graphics.clear();
+				graphics.beginFill(useColor, (down||selected||hovered)?1:0);
+				graphics.drawRect(0, 0, width, height);
+				graphics.endFill();
 			}
 			COMPILE::JS
 			{


Mime
View raw message