Re: [FlexJS] listening for scroll events

2017-02-28 Thread Alex Harui


On 2/27/17, 11:28 PM, "Justin Mclean"  wrote:

>Hi,
>
>I have a container with a ScrollingViewport. How do you listen to scroll
>events on teh content?
>
>As far asI can see the scale event don't bubble and because of the added
>containers on the JS side you need to do something ugly like this:
>
>this["positioner"].children[0].addEventListener("scroll",
>contentScrolled, false);
>
>Is there a butter way?

I don't know about a "butter" way, but if we can get you and others to
understand PAYG, DAYG (because no example so far has needed those events),
and that we want to encapsulate common patterns, then hopefully folks will
see that the answer may be to create a ScrollingViewportWithEvents and
that dispatches the events you are looking for.  Then we'll all be
"jammin'" ;-)

Thanks,
-Alex



[FlexJS] listening for scroll events

2017-02-27 Thread Justin Mclean
Hi,

I have a container with a ScrollingViewport. How do you listen to scroll events 
on teh content?

As far asI can see the scale event don't bubble and because of the added 
containers on the JS side you need to do something ugly like this:

this["positioner"].children[0].addEventListener("scroll", contentScrolled, 
false);

Is there a butter way? 

Is ScrollingViewport missing a scroll handler on it that you can assign to a 
method?

Thanks,
Justin