In these situations (assuming I understand the problem), the first
consideration is "what does the browser do?".  So if I take a bunch of
divs, give them explicit sizes and give them margins do you get what you
expect/want?  There are some funny rules on how margins work in CSS in the
browser, so setting marginRight=0px may be part of the solution.  The
marginLeft would give you space between the items.

We often just pull up an HTML Editor or JSFiddle and create the HTML and
CSS we need to create the UI we want.  Then the goal is to write FlexJS
code to programmatically create that HTML and CSS.  Sometimes creating the
HTML and CSS is hard and StackOverflow is full of complaints about how to
do it.  Then our job is to write JS to implement one of the suggested
solutions.  I imagine that Josh wrote his layouts with Gap because it was
just too painful to do it with just HTML and CSS.  That's reasonable, but
the trade-off is that it might not be using standard CSS.

Once you get something works, we next emulate that in Flash and we're not
worried as much about how that performs.  We simply have to emulate
browser behavior in Flash whether we like it or not, unless you can write
SWF-specific code that performs better.

My 2 cents,
-Alex

On 6/22/17, 7:14 AM, "yishayw" <yishayj...@hotmail.com> wrote:

>Adding margins adds a gutter on the right side of the host. This is
>probably
>because each child's width is calculated according to the parent's width
>divided by the number of children, disregarding the margins. I'm using
>padding instead, but that has the drawback that in a tiled list, for
>example, there are no non-selectable gaps.
>
>I think the fix is to take margins into account, but there might be
>performance implications.
>
>
>
>
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FFlexJS-TileLayout-tp62568p62570.html
>&data=02%7C01%7C%7Cb91ec1e0b4124d972f2508d4b97b672a%7Cfa7b1b5a7b34438794ae
>d2c178decee1%7C0%7C0%7C636337387051749065&sdata=Y9hp5AOMxxVyDAIjUgTvUkVW9b
>iPmjT94HKz9cr9Al0%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to