I did a lot of work on the layouts - in fact I re-wrote it at least once. For BasicLayout, we pull each child's CSS values and use them. They should work.
The other layouts, vertical and horizontal, use some CSS styles too (padding and margin). The layout beads try to watch for changes in the size of the strand(component) and react to those changes, running their layout algorithm again. The tricky part was the Container structure. Containers are actually two pieces (or three, if scrolling is involved): the outer part (the component) and the content view. The children go into the content view while "chrome" elements, like scrollbars, go into the outer part. This way when you ask for a Container's children, you don't get the chrome pieces in the mix. The layout operates only on the content view. And then factor in the fact that JS/HTML supplies scrolling while Flash does not. If you wanted to create a constraint-aware layout, start with BasicLayout since it loops through the children. One thing to be aware of is FlexJS's notion of size. For example, if you have a Container (without an explicit size) and two children, both have explicit size, then the size of the Container is determined by the children. A horizontal layout, for example, has to be aware of that's how the Container is being sized - it just can't ask the Container for its size because it has yet to be determined. But if you give the Container an explicit size, then this can limit the size of the children. For example, if Container is 400 pixels wide and has a vertical layout (the flexible one), then each child will be expanded to fit horizontally, but the overall height of the Container is determined by the sum of the heights of the children plus any margins and paddings on the children and on the Container. ‹peter On 6/6/16, 9:36 AM, "Harbs" <harbs.li...@gmail.com> wrote: >I¹m a bit confused. > >In BasicLayout.layout() there¹s the following code: > > var left:Number = >ValuesManager.valuesImpl.getValue(child, "left"); > var right:Number = >ValuesManager.valuesImpl.getValue(child, "right"); > var top:Number = >ValuesManager.valuesImpl.getValue(child, "top"); > var bottom:Number = >ValuesManager.valuesImpl.getValue(child, "bottom"); >and > var left:Number = >org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'left'); > var right:Number = >org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'right'); > var top:Number = >org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'top'); > var bottom:Number = >org.apache.flex.core.ValuesManager.valuesImpl.getValue(child, 'bottom'); > >I¹m probably not reading this right. > >Where do these constraint values come from, and how do they work? > >On Jun 6, 2016, at 12:46 AM, Alex Harui <aha...@adobe.com> wrote: > >> There is no ConstraintLayout. >