You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/12/06 05:17:02 UTC

[GitHub] [royale-asjs] yishayw edited a comment on issue #986: Components With Image and Label Not Laid Out Correctly

yishayw edited a comment on issue #986:
URL: https://github.com/apache/royale-asjs/issues/986#issuecomment-739455021


   VerticalLayout.updateDisplayList() has this snippet
   
   ```
           if ((layoutTarget.numElements == 0) || (unscaledWidth == 0) || (unscaledHeight == 0))
           {
               setRowCount(0);
               setIndexInView(-1, -1);
               if (layoutTarget.numElements == 0)
                   layoutTarget.setContentSize(Math.ceil(paddingLeft + paddingRight),
                                               Math.ceil(paddingTop + paddingBottom));
               return;         
           }
   
   ```
   and in our case unscaledWidth of the VGroup is 0, so measurement of inner labels is not attempted. But even setting the width was not enough. I needed to override SideLink.measuredHeight like so
   
   ```
   			override public function get measuredHeight():Number
   		      {
   			      return 17;
   		      }
   
   ```
   


----------------------------------------------------------------
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:
users@infra.apache.org