You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/09/04 20:09:08 UTC
[2/2] git commit: [flex-asjs] [refs/heads/develop] - Fix formatting
of style attribute + add fill-opacity attribute
Fix formatting of style attribute + add fill-opacity attribute
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9cdabb2c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9cdabb2c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9cdabb2c
Branch: refs/heads/develop
Commit: 9cdabb2ce47b9f20b4db83e0287cf0958ac2c78b
Parents: de1eae6
Author: Om <bi...@gmail.com>
Authored: Thu Sep 4 01:43:11 2014 -0700
Committer: Om <bi...@gmail.com>
Committed: Thu Sep 4 01:43:11 2014 -0700
----------------------------------------------------------------------
frameworks/js/FlexJS/src/org/apache/flex/core/graphics/Rect.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9cdabb2c/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 f8e464e..570cb16 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
@@ -61,7 +61,7 @@ org.apache.flex.core.graphics.Rect.prototype.drawRect = function(x, y, width, he
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 = 'fill:#' + String(color) + ';stroke:#'+ String(strokeColor) + ';stroke-width:' + String(this.get_stroke().get_weight());
var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
rect.setAttribute('style', style);
@@ -69,5 +69,6 @@ org.apache.flex.core.graphics.Rect.prototype.drawRect = function(x, y, width, he
rect.setAttribute('y', String(y));
rect.setAttribute('width', String(width));
rect.setAttribute('height', String(height));
+ rect.setAttribute('fill-opacity', String(this.get_fill().get_alpha()));
this.element.appendChild(rect);
};