mjesteve commented on issue #1193:
URL: https://github.com/apache/royale-asjs/issues/1193#issuecomment-1101907175

   A much easier possible solution?... (In the List 
`hostComponent.containsClass("scroll")`  always true)
   
   ```
   
                override public function layout():Boolean
                {
   ...
                                 trace("  -- calculate useWidth & useHeight 
------");
                                var borderMetrics:EdgeData = 
(ValuesManager.valuesImpl as 
IBorderPaddingMarginValuesImpl).getBorderMetrics(host);
                                var adjustedHostWidth:Number = 
Math.floor(host.width - borderMetrics.left - borderMetrics.right);
                                   //scrollWidth --> width without scrollBar
                                adjustedHostWidth = Math.min(adjustedHostWidth, 
hostComponent.element.scrollWidth);
   
   ...
                }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to