Re: rollOut Issue with child dropdown in panel

2016-09-19 Thread OK
Mihai Chira wrote
> I would use event.target. I haven't compiled the code, but I imagine
> something like this should work:
> 
> if(event.target == p)
> {
> removeElement(p);
> p = null;
> } 

Unfortunately "target" and "currentTarget" refers always to the "Panel".

Olaf



--
View this message in context: 
http://apache-flex-users.246.n4.nabble.com/rollOut-Issue-with-child-dropdown-in-panel-tp13568p13576.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: rollOut Issue with child dropdown in panel

2016-09-19 Thread Mihai Chira
I would use event.target. I haven't compiled the code, but I imagine
something like this should work:

if(event.target == p)
{
removeElement(p);
p = null;
}

On 19 September 2016 at 16:21, OK  wrote:
> Code was eaten by the mailing list, here's just the modified function:
>
> private function onRollout(event:MouseEvent):void {
> // Analyze the "relatedObject" property
> if(event.relatedObject!=null && Group(event.relatedObject).id !=
> "dropDown") {
> removeElement(p);
> p=null;
> }
> }
>
> HTH,
> Olaf
>
>
>
> --
> View this message in context: 
> http://apache-flex-users.246.n4.nabble.com/rollOut-Issue-with-child-dropdown-in-panel-tp13568p13570.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: rollOut Issue with child dropdown in panel

2016-09-19 Thread OK
Code was eaten by the mailing list, here's just the modified function:

private function onRollout(event:MouseEvent):void {
// Analyze the "relatedObject" property
if(event.relatedObject!=null && Group(event.relatedObject).id !=
"dropDown") {
removeElement(p);
p=null;
}
}

HTH,
Olaf



--
View this message in context: 
http://apache-flex-users.246.n4.nabble.com/rollOut-Issue-with-child-dropdown-in-panel-tp13568p13570.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: rollOut Issue with child dropdown in panel

2016-09-19 Thread OK
>How can this be avoided? The Panel should stay open...

This modified "onRollout" code will work but maybe there is some more
elegant way.
It uses the relatedObject property [1].
Btw: 
Instead of the Panel maybe the Callout component [2] better suits your
needs?.

HTH,
Olaf

[1]
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent.html#relatedObject

[2] https://github.com/ok-at-github/Apache-Flex-Callout-demo



http://ns.adobe.com/mxml/2009;
xmlns:s="library://ns.adobe.com/flex/spark">







--
View this message in context: 
http://apache-flex-users.246.n4.nabble.com/rollOut-Issue-with-child-dropdown-in-panel-tp13568p13569.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.