This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1823985  Fixed rx and ry
1823985 is described below

commit 1823985ef7adbdbe2adc1cba48067bfb8fc5a14b
Author: Harbs <[email protected]>
AuthorDate: Wed Oct 2 11:10:37 2019 +0300

    Fixed rx and ry
---
 .../src/main/royale/org/apache/royale/svg/Rect.as  | 29 +++++++++++++---------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/svg/Rect.as 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/svg/Rect.as
index 15bf4a1..ba51f9b 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/svg/Rect.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/svg/Rect.as
@@ -25,7 +25,7 @@ package org.apache.royale.svg
     COMPILE::SWF
     {
         import flash.geom.Point;
-        import flash.geom.Rectangle;            
+        import flash.geom.Rectangle;
     }
     COMPILE::JS
     {
@@ -134,29 +134,34 @@ package org.apache.royale.svg
                 var style:String = this.getStyleStr();
                                
                                if (_rect == null) {
-                       _rect = createSVG('rect') as WrappedHTMLElement;
-                       _rect.royale_wrapper = this;
+                                       _rect = createSVG('rect') as 
WrappedHTMLElement;
+                                       _rect.royale_wrapper = this;
                                        element.appendChild(_rect);
                                }
-                _rect.setAttribute('style', style);
-                if (stroke)
-                {
+                               _rect.setAttribute('style', style);
+                               if (stroke)
+                               {
                                        _rect.setAttribute('x', stroke.weight / 
2);
                                        _rect.setAttribute('y', stroke.weight / 
2);
-                }
-                else
-                {
+                               }
+                               else
+                               {
                                        _rect.setAttribute('x', 0);
                                        _rect.setAttribute('y', 0);
-                }
+                               }
                                if(width)
                                        _rect.setAttribute('width', width);
                                if(height)
                                        _rect.setAttribute('height', height);
-                
+                               if(!isNaN(_rx)){
+                                       _rect.setAttribute('rx', _rx);
+                               }
+                               if(!isNaN(_ry)){
+                                       _rect.setAttribute('ry', _ry);
+                               }
                                // resize(x, y, getBBox(_rect));
                                resize(x, y);
-            }
+                       }
                }
                
                COMPILE::JS

Reply via email to