flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject [5/6] git commit: [flex-asjs] [refs/heads/develop] - Clean up Rect
Date Sat, 06 Sep 2014 00:22:38 GMT
Clean up Rect


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

Branch: refs/heads/develop
Commit: 8404ff2180f9066052a642c09411c0c4b4c8425b
Parents: c32de24
Author: Om <bigosmallm@gmail.com>
Authored: Fri Sep 5 17:20:22 2014 -0700
Committer: Om <bigosmallm@gmail.com>
Committed: Fri Sep 5 17:20:22 2014 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/graphics/Rect.as       |  5 -----
 .../src/org/apache/flex/core/graphics/Rect.js       | 16 +---------------
 2 files changed, 1 insertion(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8404ff21/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
index a580e0f..5618870 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Rect.as
@@ -9,11 +9,6 @@ package org.apache.flex.core.graphics
 		private var _width:Number;
 		private var _height:Number;
 		
-		public function Rect()
-		{
-			super();
-		}
-		
 		/**
 		 *  Draw the rectangle.
 		 *  @param x The x position of the top-left corner of the rectangle.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8404ff21/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
index f06e318..e1cf279 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js
@@ -25,11 +25,6 @@ goog.require('org.apache.flex.core.graphics.GraphicShape');
 org.apache.flex.core.graphics.Rect = function() {
   org.apache.flex.core.graphics.Rect.base(this, 'constructor');
 
-  /**
-   * @private
-   * @type {number}
-   */
-  this.fillColor_ = 0;
 };
 goog.inherits(org.apache.flex.core.graphics.Rect,
     org.apache.flex.core.graphics.GraphicShape);
@@ -53,16 +48,7 @@ org.apache.flex.core.graphics.Rect.prototype.FLEXJS_CLASS_INFO =
  * @param {number} height The height of the rectangle.
  */
 org.apache.flex.core.graphics.Rect.prototype.drawRect = function(x, y, width, height) {
-	var color = Number(this.get_fill().get_color()).toString(16);
-	if (color.length == 2) color = '00' + color;
-	if (color.length == 4) color = '00' + color;
-	
-	var strokeColor = Number(this.get_stroke().get_color()).toString(16);
-	if (strokeColor.length == 2) strokeColor = '00' + strokeColor;
-	if (strokeColor.length == 4) strokeColor = '00' + strokeColor;
-
-	var style = 'fill:#' + String(color) + ';stroke:#'+ String(strokeColor) + ';stroke-width:'
+ String(this.get_stroke().get_weight());
-
+	var style = this.getStyleStr();
 	var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
 	rect.setAttribute('style', style);
 	rect.setAttribute('x', String(this.get_stroke().get_weight()));


Mime
View raw message