Bilbosax commented on issue #1063:
URL: https://github.com/apache/royale-asjs/issues/1063#issuecomment-766416586


   Sure Carlos.  This is just a simple MXML file that should create a Group in 
the upper left corner of the screen that is 800 x 50, and the group should be 
filled by an SVG Rectangle that is also 800 x 50.  The dimensions of both 
components are set by actionscript after the appComplete event is fired.  It 
does not work even though it traces out that the dimensions of both objects are 
actually 800 x 50.  But if you take the width, height, x, and y properties and 
put them directly into the Rect MXML, it works as expected.  But it cannot be 
resized with Actionscript if needed.
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <j:Application  xmlns:fx="http://ns.adobe.com/mxml/2009";
                   xmlns:j="library://ns.apache.org/royale/jewel"
                        xmlns:js="library://ns.apache.org/royale/basic"
                xmlns:svg="library://ns.apache.org/royale/svg"
                applicationComplete="appComplete(event)">
   
        
        <fx:Script>
                <![CDATA[
                
                protected function appComplete(event:Event):void {
   
                        headerGroup.width = 800
                        headerGroup.height = 50;
                        headerGroup.x = 0;
                        headerGroup.y = 0;
                        headerRect.width = headerGroup.width;
                        headerRect.height = headerGroup.height;
                        headerRect.x = 0;
                        headerRect.y = 0;
                        
                        trace("App Complete");
                        trace(headerGroup.width, headerGroup.height, 
headerRect.width, headerRect);
                }
                
                ]]>
        </fx:Script>
        
       <j:initialView>          
           <j:View localId="mainView" width="100%" height="100%">
                <j:Group localId="headerGroup">
                        <svg:Rect localId="headerRect">
                                <svg:fill>
                                        <js:SolidColor color="#323233"/>
                                </svg:fill>
                        </svg:Rect>
                </j:Group>   
           </j:View>
       </j:initialView>
   </j:Application>
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to