On 6/6/16, 8:48 AM, "jude" <flexcapaci...@gmail.com> wrote:
>I'm using FlexJS 0.6.0. Then the source path would end with src/main/flex > >CSS should get LTRB support for free on the HTML side. The horizontal and >vertical positioning is possible but you have to use transforms and >possibly ensure some other specific conditions. I was going to look into >how the layout is working to see how difficult it would be to add. It >looks >like Harbs asked about layout as well in another thread. I've been trying >to stress test FlexJS on the HTML side by creating some layouts and the >constraints was the first thing I ran into that I thought I might be able >to help. Constraints in this case referring to left, top, right, bottom, >verticalCenter, horizontalCenter, baseline instead of the Cartesian ><https://en.wikipedia.org/wiki/Cartesian_coordinate_system> coordinate >system. IIRC, use of LTRB is a bit tricky in CSS in the browser. The default HorizontalLayout and VerticalLayout try to use the CSS display property to position the children (in-line or block) instead of using absolute positioning and calculating the x,y,w,h. Again, the principle is lowest overhead. We might add an AbsolutePositioningHorizontalLayout/AbsolutePositioningVerticalLayout if folks find it useful. Because if you aren't using absolute positioning, I think you can't use LTRB and have to use margins and padding instead. We have not done any work on baseline, so a volunteer is needed for that. CSS has verticalAlign instead of verticalCenter. CSS has margin-left/margin-right:auto instead of horizontalCenter. Again in order to be as CSS compliant as possible. And again, FlexJS is flexible: someone can always write alternate layouts that don't leverage CSS because it would be easier to learn/use. HTH, -Alex