Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88CE611B92 for ; Wed, 17 Sep 2014 01:25:26 +0000 (UTC) Received: (qmail 37046 invoked by uid 500); 17 Sep 2014 01:25:26 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 36853 invoked by uid 500); 17 Sep 2014 01:25:26 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 36496 invoked by uid 99); 17 Sep 2014 01:25:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2014 01:25:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ACEF8A178D3; Wed, 17 Sep 2014 01:25:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bigosmallm@apache.org To: commits@flex.apache.org Date: Wed, 17 Sep 2014 01:25:28 -0000 Message-Id: <0fce972b63f5477db0637fef4dc88e5c@git.apache.org> In-Reply-To: <23c9fad92f9543709c7dec5ccb306071@git.apache.org> References: <23c9fad92f9543709c7dec5ccb306071@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/7] git commit: [flex-asjs] [refs/heads/develop] - Add fix for non-Chrome browsers 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 Authored: Tue Sep 16 18:21:14 2014 -0700 Committer: Om 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); };