You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2014/11/26 02:29:15 UTC

[FlexJS] States mess up layers?

The elements that appear lower in MXML need to appear higher in the display
order.  But introducing States seems to be messing up the order.

Here is my very simple skin:

<basic:Container x="100" y="100" >
<basic:Rect id="fill_up" width="100" height="30" *includeIn="up"* >
<basic:stroke>
<basic:SolidColorStroke alpha="1.0" color="#000000" />
</basic:stroke>
<basic:fill>
<basic:SolidColor color="#1ABC9C" alpha="1.0" />
</basic:fill>
</basic:Rect>
<basic:Label text="MyButton" x="75" y="5" />
</basic:Container>

This is how it looks: http://snag.gy/5Kx0Y.jpg


When I remove the includeIn attribute like this:

<basic:Container x="100" y="100" >
<basic:Rect id="fill_up" width="100" height="30" >
<basic:stroke>
<basic:SolidColorStroke alpha="1.0" color="#000000" />
</basic:stroke>
<basic:fill>
<basic:SolidColor color="#1ABC9C" alpha="1.0" />
</basic:fill>
</basic:Rect>
<basic:Label text="MyButton" x="75" y="5" />
</basic:Container>

This is how it looks (correct): http://snag.gy/H1jPv.jpg



Any idea what's happening here?  Which class(es) would I look to debug and
fix this issue.

Thanks,
Om

Re: [FlexJS] States mess up layers?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Nov 25, 2014 6:26 PM, "Alex Harui" <ah...@adobe.com> wrote:
>
>
>
> On 11/25/14, 6:06 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >>
> >> I’ll bet the relativeTo in org.apache.flex.states.AddItems isn’t being
> >>set
> >> or handled properly.  I’ve not done any testing of overlapping
elements.
> >> AddItems and its friends SetProperty and SetEventHandler are just data
> >> objects in FlexJS and can be interpreted in different ways by different
> >> States implementations.  The only one right now is
> >> org.apache.core.SimpleStatesImpl so its code is probably the place to
> >>look
> >> to see how relativeTo is working.
> >>
> >
> >Are you sure it is an issue with overlapping elements?  It looks more
like
> >a depth management issue to me.
>
> Sorry, what I meant is that none of my states scenarios overlap elements
> in a way that would expose the depth management issue.  I was just happy
> that stuff appeared and disappeared.
>
> Thanks for looking into it,

Ah, the other 'overlapping'.  Got it :-)

Thanks,
Om

> -Alex
>

Re: [FlexJS] States mess up layers?

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/14, 6:06 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>>
>> I’ll bet the relativeTo in org.apache.flex.states.AddItems isn’t being
>>set
>> or handled properly.  I’ve not done any testing of overlapping elements.
>> AddItems and its friends SetProperty and SetEventHandler are just data
>> objects in FlexJS and can be interpreted in different ways by different
>> States implementations.  The only one right now is
>> org.apache.core.SimpleStatesImpl so its code is probably the place to
>>look
>> to see how relativeTo is working.
>>
>
>Are you sure it is an issue with overlapping elements?  It looks more like
>a depth management issue to me.

Sorry, what I meant is that none of my states scenarios overlap elements
in a way that would expose the depth management issue.  I was just happy
that stuff appeared and disappeared.

Thanks for looking into it,
-Alex


Re: [FlexJS] States mess up layers?

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Nov 25, 2014 5:59 PM, "Alex Harui" <ah...@adobe.com> wrote:
>
>
>
> On 11/25/14, 5:29 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >The elements that appear lower in MXML need to appear higher in the
> >display
> >order.  But introducing States seems to be messing up the order.
> >
> >Any idea what's happening here?  Which class(es) would I look to debug
and
> >fix this issue.
>
> I’ll bet the relativeTo in org.apache.flex.states.AddItems isn’t being set
> or handled properly.  I’ve not done any testing of overlapping elements.
> AddItems and its friends SetProperty and SetEventHandler are just data
> objects in FlexJS and can be interpreted in different ways by different
> States implementations.  The only one right now is
> org.apache.core.SimpleStatesImpl so its code is probably the place to look
> to see how relativeTo is working.
>

Are you sure it is an issue with overlapping elements?  It looks more like
a depth management issue to me.

Anyways,  I will poke around and see what I find.

Thanks,
Om

> -Alex
>

Re: [FlexJS] States mess up layers?

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/14, 5:29 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>The elements that appear lower in MXML need to appear higher in the
>display
>order.  But introducing States seems to be messing up the order.
>
>Any idea what's happening here?  Which class(es) would I look to debug and
>fix this issue.

I’ll bet the relativeTo in org.apache.flex.states.AddItems isn’t being set
or handled properly.  I’ve not done any testing of overlapping elements.
AddItems and its friends SetProperty and SetEventHandler are just data
objects in FlexJS and can be interpreted in different ways by different
States implementations.  The only one right now is
org.apache.core.SimpleStatesImpl so its code is probably the place to look
to see how relativeTo is working.

-Alex