flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject [4/7] git commit: [flex-asjs] [refs/heads/develop] - Add fix for non-Chrome browsers
Date Wed, 17 Sep 2014 01:25:28 GMT
Add fix for non-Chrome browsers


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

Branch: refs/heads/develop
Commit: 692951725d58437756bf2564be97c3623f360501
Parents: b330ab1
Author: Om <bigosmallm@gmail.com>
Authored: Tue Sep 16 18:21:14 2014 -0700
Committer: Om <bigosmallm@gmail.com>
Committed: Tue Sep 16 18:24:46 2014 -0700

----------------------------------------------------------------------
 .../org/apache/flex/core/graphics/GraphicsContainer.js  |  8 ++++----
 .../js/FlexJS/src/org/apache/flex/core/graphics/Rect.js | 12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69295172/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
index 9af3541..3b1197a 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/graphics/GraphicsContainer.js
@@ -49,10 +49,10 @@ org.apache.flex.core.graphics.GraphicsContainer.prototype.drawRect = function(x,
   var style = this.getStyleStr();
   var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
   rect.setAttribute('style', style);
-  rect.setAttribute('x', String(x));
-  rect.setAttribute('y', String(y));
-  rect.setAttribute('width', String(width));
-  rect.setAttribute('height', String(height));
+  rect.setAttribute('x', String(x) + 'px');
+  rect.setAttribute('y', String(y) + 'px');
+  rect.setAttribute('width', String(width) + 'px');
+  rect.setAttribute('height', String(height) + 'px');
   this.element.appendChild(rect);
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69295172/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 bc3364a..01f784c 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
@@ -53,17 +53,17 @@ org.apache.flex.core.graphics.Rect.prototype.drawRect = function(x, y,
width, he
     rect.setAttribute('style', style);
     if (this.get_stroke())
     {
-      rect.setAttribute('x', String(this.get_stroke().get_weight() / 2));
-      rect.setAttribute('y', String(this.get_stroke().get_weight() / 2));
+      rect.setAttribute('x', String(this.get_stroke().get_weight() / 2) + 'px');
+      rect.setAttribute('y', String(this.get_stroke().get_weight() / 2) + 'px');
       this.setPosition(x, y, this.get_stroke().get_weight(), this.get_stroke().get_weight());
     }
     else
     {
-      rect.setAttribute('x', '0');
-      rect.setAttribute('y', '0');
+      rect.setAttribute('x', '0' + 'px');
+      rect.setAttribute('y', '0' + 'px');
       this.setPosition(x, y, 0, 0);
     }
-    rect.setAttribute('width', String(width));
-    rect.setAttribute('height', String(height));
+    rect.setAttribute('width', String(width) + 'px');
+    rect.setAttribute('height', String(height) + 'px');
     this.element.appendChild(rect);
   };


Mime
View raw message