You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Justin Mclean <ju...@classsoftware.com> on 2017/03/01 01:21:31 UTC

[FlexJS] content being push out of the way in container

Hi,

I have this code:

<js:Container xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/flexjs/basic”>
<js:Container id="cover" percentHeight="100" percentWidth="100" visible="false">
    <js:style>
        <js:SimpleCSSStyles backgroundColor="rgba(255,255,255,0.7)" />
    </js:style>
</js:Container>

<js:Label text=“Hello World" />
</js:Container>

Changing the visibility of the cover container causes the text to jump outside often container.

Oddly adding x=“0” y=“0” to the cover and the label fixes the issue. Should all items in a Container have x and y set to zero? It’s assume they overlap right? - unlike a HContainer or VContainer.

Thanks,
Justin 

Re: [FlexJS] content being push out of the way in container

Posted by Peter Ent <pe...@adobe.com>.
I believe at this point, Container and perhaps the layouts need a
re-write. These are fundamental to FlexJS and must be correct. FlexJS is
trying to bridge two worlds with different ideas about coordinate systems
and it is behaving erratically at times, like this.

I think the solution is more complex than going in to fix a layout that
isn't handling visible and positioning correctly.

‹peter

On 2/28/17, 8:21 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>I have this code:
>
><js:Container xmlns:fx="http://ns.adobe.com/mxml/2009"
>xmlns:js="library://ns.apache.org/flexjs/basic²>
><js:Container id="cover" percentHeight="100" percentWidth="100"
>visible="false">
>    <js:style>
>        <js:SimpleCSSStyles backgroundColor="rgba(255,255,255,0.7)" />
>    </js:style>
></js:Container>
>
><js:Label text=³Hello World" />
></js:Container>
>
>Changing the visibility of the cover container causes the text to jump
>outside often container.
>
>Oddly adding x=³0² y=³0² to the cover and the label fixes the issue.
>Should all items in a Container have x and y set to zero? It¹s assume
>they overlap right? - unlike a HContainer or VContainer.
>
>Thanks,
>Justin