Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Justin Mclean-2
Hi,

JFYI still work in progress the calculations around outside need a little bit more work as I’m reasonably sure it need to take into account the x, y co-ords and check left and top boundaries as well. I’ll get to that later today / tomorrow.

Thanks,
Justin


Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Justin Mclean-2
Hi,

And my last check has fixed the issue so should be all good.

Thanks,
Justin
Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Alex Harui-2
Hi Justin,

Are you saying a rollOut is being dispatched when you haven't rolled out
of the tooltip?  WOuldn't that be a problem in the rollout logic?

-Alex

On 7/10/17, 11:14 PM, "Justin Mclean" <[hidden email]> wrote:

>Hi,
>
>And my last check has fixed the issue so should be all good.
>
>Thanks,
>Justin

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Alex Harui-2
In reply to this post by Justin Mclean-2
This seems like "just-in-case" code.  I could see that it might be needed
in a different bead for Express though.

Without this change, is there an infinite loop somewhere?

Thanks,
-Alex

On 7/10/17, 10:40 PM, "[hidden email]" <[hidden email]> wrote:

>FLEX-35338 stop cursor from spinning / CPU from spiking
>
>
>Project:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5b3b3
>54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363534
>84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&reser
>ved=0
>Commit:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01%7C%
>7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2BAaq
>G280z0%3D&reserved=0
>Tree:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7C%7C
>8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixalc%3
>D&reserved=0
>Diff:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7C%7C
>8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwop5J4
>7cIU%3D&reserved=0
>
>Branch: refs/heads/develop
>Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>Parents: 3891820
>Author: Justin Mclean <[hidden email]>
>Authored: Tue Jul 11 14:57:04 2017 +1000
>Committer: Justin Mclean <[hidden email]>
>Committed: Tue Jul 11 14:57:04 2017 +1000
>
>----------------------------------------------------------------------
> .../main/flex/org/apache/flex/html/accessories/ToolTipBead.as   | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>----------------------------------------------------------------------
>
>
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2Fpro
>jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Faccessori
>es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768%7Cf
>a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hifp5T8
>xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>----------------------------------------------------------------------
>diff --git
>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>/ToolTipBead.as
>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>/ToolTipBead.as
>index 03ce21e..bdf0b68 100644
>---
>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>/ToolTipBead.as
>+++
>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>/ToolTipBead.as
>@@ -100,7 +100,10 @@ package org.apache.flex.html.accessories
> * @private
> */
> protected function rollOverHandler( event:MouseEvent ):void
>- {
>+ {
>+ if (!toolTip)
>+ return;
>+
>            
>IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT,
>rollOutHandler, false);
>            
>             var comp:IUIBase = _strand as IUIBase
>

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Harbs
Shouldn’t the event be triggered by rollover rather than mouseover?

That seems like the issue to me…

> On Jul 11, 2017, at 10:13 AM, Alex Harui <[hidden email]> wrote:
>
> This seems like "just-in-case" code.  I could see that it might be needed
> in a different bead for Express though.
>
> Without this change, is there an infinite loop somewhere?
>
> Thanks,
> -Alex
>
> On 7/10/17, 10:40 PM, "[hidden email]" <[hidden email]> wrote:
>
>> FLEX-35338 stop cursor from spinning / CPU from spiking
>>
>>
>> Project:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5b3b3
>> 54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363534
>> 84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&reser
>> ved=0
>> Commit:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01%7C%
>> 7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>> 7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2BAaq
>> G280z0%3D&reserved=0
>> Tree:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7C%7C
>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>> 0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixalc%3
>> D&reserved=0
>> Diff:
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7C%7C
>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>> 0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwop5J4
>> 7cIU%3D&reserved=0
>>
>> Branch: refs/heads/develop
>> Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>> Parents: 3891820
>> Author: Justin Mclean <[hidden email]>
>> Authored: Tue Jul 11 14:57:04 2017 +1000
>> Committer: Justin Mclean <[hidden email]>
>> Committed: Tue Jul 11 14:57:04 2017 +1000
>>
>> ----------------------------------------------------------------------
>> .../main/flex/org/apache/flex/html/accessories/ToolTipBead.as   | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>> ----------------------------------------------------------------------
>>
>>
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2Fpro
>> jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Faccessori
>> es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768%7Cf
>> a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hifp5T8
>> xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>> ----------------------------------------------------------------------
>> diff --git
>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>> /ToolTipBead.as
>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>> /ToolTipBead.as
>> index 03ce21e..bdf0b68 100644
>> ---
>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>> /ToolTipBead.as
>> +++
>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>> /ToolTipBead.as
>> @@ -100,7 +100,10 @@ package org.apache.flex.html.accessories
>> * @private
>> */
>> protected function rollOverHandler( event:MouseEvent ):void
>> - {
>> + {
>> + if (!toolTip)
>> + return;
>> +
>>
>> IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT,
>> rollOutHandler, false);
>>
>>            var comp:IUIBase = _strand as IUIBase
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Justin Mclean
Administrator
Hi,

I not sure how this could be consider "just in case" when previous the tooltip didn’t work and had an infinite loop? Before it was incorrectly destroying and recreating the tooltip endlessly when you were still inside the UI element. You got a horrible flickering / strobing as it created and destroyed the tooltip as fast as it possibly could when you moused over the tooltip itself.

But if you have an alternative (tested) way of fixing this please do suggest it and/or modify the code.

Thanks,
Justin
Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Harbs
Did you try mouseenter? (See my other responses)

It seems like that should solve the problem.

> On Jul 11, 2017, at 11:01 AM, Justin Mclean <[hidden email]> wrote:
>
> Hi,
>
> I not sure how this could be consider "just in case" when previous the tooltip didn’t work and had an infinite loop? Before it was incorrectly destroying and recreating the tooltip endlessly when you were still inside the UI element. You got a horrible flickering / strobing as it created and destroyed the tooltip as fast as it possibly could when you moused over the tooltip itself.
>
> But if you have an alternative (tested) way of fixing this please do suggest it and/or modify the code.
>
> Thanks,
> Justin

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Harbs
In reply to this post by Harbs
No. I’m wrong.

First of all, it’s mouseenter rather than rollover, and it seems like it’s fired more than mouseover.[1]
https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter <https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter>

That does beg the question though: Are the MouseEvent constants wrong for Javascript?


> On Jul 11, 2017, at 10:38 AM, Harbs <[hidden email]> wrote:
>
> Shouldn’t the event be triggered by rollover rather than mouseover?
>
> That seems like the issue to me…
>
>> On Jul 11, 2017, at 10:13 AM, Alex Harui <[hidden email]> wrote:
>>
>> This seems like "just-in-case" code.  I could see that it might be needed
>> in a different bead for Express though.
>>
>> Without this change, is there an infinite loop somewhere?
>>
>> Thanks,
>> -Alex
>>
>> On 7/10/17, 10:40 PM, "[hidden email]" <[hidden email]> wrote:
>>
>>> FLEX-35338 stop cursor from spinning / CPU from spiking
>>>
>>>
>>> Project:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5b3b3
>>> 54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363534
>>> 84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&reser
>>> ved=0
>>> Commit:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01%7C%
>>> 7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>> 7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2BAaq
>>> G280z0%3D&reserved=0
>>> Tree:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7C%7C
>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>> 0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixalc%3
>>> D&reserved=0
>>> Diff:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7C%7C
>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>> 0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwop5J4
>>> 7cIU%3D&reserved=0
>>>
>>> Branch: refs/heads/develop
>>> Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>>> Parents: 3891820
>>> Author: Justin Mclean <[hidden email]>
>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>> Committer: Justin Mclean <[hidden email]>
>>> Committed: Tue Jul 11 14:57:04 2017 +1000
>>>
>>> ----------------------------------------------------------------------
>>> .../main/flex/org/apache/flex/html/accessories/ToolTipBead.as   | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2Fpro
>>> jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Faccessori
>>> es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768%7Cf
>>> a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hifp5T8
>>> xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>> /ToolTipBead.as
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>> /ToolTipBead.as
>>> index 03ce21e..bdf0b68 100644
>>> ---
>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>> /ToolTipBead.as
>>> +++
>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>> /ToolTipBead.as
>>> @@ -100,7 +100,10 @@ package org.apache.flex.html.accessories
>>> * @private
>>> */
>>> protected function rollOverHandler( event:MouseEvent ):void
>>> - {
>>> + {
>>> + if (!toolTip)
>>> + return;
>>> +
>>>
>>> IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT,
>>> rollOutHandler, false);
>>>
>>>           var comp:IUIBase = _strand as IUIBase
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Harbs
I can’t make up my mind… ;-)

I’m not sure why the MDN article says the mouseenter can have more CPU problems. It seems like mouseover should be dispatched more because it bubbles up from all sub-elements.[2] It seems like mouseover is identical to mouseOver in Flash and mouseenter is identical to rollOver.

That should mean that mouseenter should be the better option.

[2]https://www.quirksmode.org/js/events_mouse.html <https://www.quirksmode.org/js/events_mouse.html>

> On Jul 11, 2017, at 10:48 AM, Harbs <[hidden email]> wrote:
>
> No. I’m wrong.
>
> First of all, it’s mouseenter rather than rollover, and it seems like it’s fired more than mouseover.[1]
> https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter <https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter>
>
> That does beg the question though: Are the MouseEvent constants wrong for Javascript?
>
>
>> On Jul 11, 2017, at 10:38 AM, Harbs <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Shouldn’t the event be triggered by rollover rather than mouseover?
>>
>> That seems like the issue to me…
>>
>>> On Jul 11, 2017, at 10:13 AM, Alex Harui <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> This seems like "just-in-case" code.  I could see that it might be needed
>>> in a different bead for Express though.
>>>
>>> Without this change, is there an infinite loop somewhere?
>>>
>>> Thanks,
>>> -Alex
>>>
>>> On 7/10/17, 10:40 PM, "[hidden email] <mailto:[hidden email]>" <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>>> FLEX-35338 stop cursor from spinning / CPU from spiking
>>>>
>>>>
>>>> Project:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us>
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5b3b3
>>>> 54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363534
>>>> 84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&reser
>>>> ved=0
>>>> Commit:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01%7C%
>>>> 7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>>> 7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2BAaq
>>>> G280z0%3D&reserved=0
>>>> Tree:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7C%7C
>>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>> 0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixalc%3
>>>> D&reserved=0
>>>> Diff:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7C%7C
>>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>> 0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwop5J4
>>>> 7cIU%3D&reserved=0
>>>>
>>>> Branch: refs/heads/develop
>>>> Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>>>> Parents: 3891820
>>>> Author: Justin Mclean <[hidden email]>
>>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>>> Committer: Justin Mclean <[hidden email]>
>>>> Committed: Tue Jul 11 14:57:04 2017 +1000
>>>>
>>>> ----------------------------------------------------------------------
>>>> .../main/flex/org/apache/flex/html/accessories/ToolTipBead.as   | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2Fpro
>>>> jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Faccessori
>>>> es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768%7Cf
>>>> a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hifp5T8
>>>> xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> index 03ce21e..bdf0b68 100644
>>>> ---
>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> +++
>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> @@ -100,7 +100,10 @@ package org.apache.flex.html.accessories
>>>> * @private
>>>> */
>>>> protected function rollOverHandler( event:MouseEvent ):void
>>>> - {
>>>> + {
>>>> + if (!toolTip)
>>>> + return;
>>>> +
>>>>
>>>> IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT,
>>>> rollOutHandler, false);
>>>>
>>>>           var comp:IUIBase = _strand as IUIBase
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Justin Mclean
Administrator
In reply to this post by Harbs
Hi,

> Did you try mouseenter? (See my other responses)

Yes and no it didn’t but perhaps you can get it to work that way. Feel free to do so.

If you do make any changes suggested test cases to test for include:
- mousing over the tooltip itself
- having the tooltip smaller than the object it sits on and mousing over it and off each edge of the tooltip
- having the tooltip expand over the (right) boundary of the item it covers and moving out over the tool tip not cutting a visible edge of the item underneath
- rolling off over the top, bottom, left or right edges

The change I made works in all those situations.

Thanks,
Justin
Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

piotrz
Hi,

Even if it's working now, Harbs did research and find out that MouseEnter is a better for that, so I will spent my time to test your scenario. Maybe tomorrow. Before that couple of questions:

- For what element did you use tooltip ? Does it matter ?
- " having the tooltip smaller than the object it sits " - Did you give tooltip some specific size ? This is what you mean ?

Piotr
Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Harbs
In reply to this post by Justin Mclean
Thanks.

I just looked at the code to see why that would not work, and I see that the tool tip is being added to the “PopUpHost” rather than the element.

I’m not sure whether that’s the best way to handle it.

One the one hand, being that the tool tip is a higher level element, we’re getting unnecessary mouse events when mousing in and out of the tool tip. On the other hand, placing it inside the target element might effect layout and the like. It’s possible that this can be solved using absolute/fixed positioning and zindex.

Thoughts?
Harbs

> On Jul 11, 2017, at 11:16 AM, Justin Mclean <[hidden email]> wrote:
>
> Hi,
>
>> Did you try mouseenter? (See my other responses)
>
> Yes and no it didn’t but perhaps you can get it to work that way. Feel free to do so.
>
> If you do make any changes suggested test cases to test for include:
> - mousing over the tooltip itself
> - having the tooltip smaller than the object it sits on and mousing over it and off each edge of the tooltip
> - having the tooltip expand over the (right) boundary of the item it covers and moving out over the tool tip not cutting a visible edge of the item underneath
> - rolling off over the top, bottom, left or right edges
>
> The change I made works in all those situations.
>
> Thanks,
> Justin

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

piotrz
Maybe worth to check how it is handled in MDL.

Piotr
Reply | Threaded
Open this post in threaded view
|

[FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)

Harbs
In reply to this post by Harbs
I’m breaking this off into its own thread because it deserves a separate discussion.

After looking into how ROLL_OVER/ROLL_OUT events work, I see that it’s being handled pretty oddly. MouseEvent has a “installRollOverMixin” function which adds a mouseover event to window and fires ROLL_OVER and ROLL_OUT events for any elements which have listeners registered for them.

This seems horribly inefficient and I don’t understand why it’s necessary. It seems to me that mouseenter and rollOver (as well as mouseleave and rollOut) are analogous.

Am I missing something?

Thanks,
Harbs

> On Jul 11, 2017, at 10:48 AM, Harbs <[hidden email]> wrote:
>
> No. I’m wrong.
>
> First of all, it’s mouseenter rather than rollover, and it seems like it’s fired more than mouseover.[1]
> https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter <https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter>
>
> That does beg the question though: Are the MouseEvent constants wrong for Javascript?
>
>
>> On Jul 11, 2017, at 10:38 AM, Harbs <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Shouldn’t the event be triggered by rollover rather than mouseover?
>>
>> That seems like the issue to me…
>>
>>> On Jul 11, 2017, at 10:13 AM, Alex Harui <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> This seems like "just-in-case" code.  I could see that it might be needed
>>> in a different bead for Express though.
>>>
>>> Without this change, is there an infinite loop somewhere?
>>>
>>> Thanks,
>>> -Alex
>>>
>>> On 7/10/17, 10:40 PM, "[hidden email] <mailto:[hidden email]>" <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>>> FLEX-35338 stop cursor from spinning / CPU from spiking
>>>>
>>>>
>>>> Project:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us>
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5b3b3
>>>> 54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363534
>>>> 84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&reser
>>>> ved=0
>>>> Commit:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01%7C%
>>>> 7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>>> 7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2BAaq
>>>> G280z0%3D&reserved=0
>>>> Tree:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7C%7C
>>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>> 0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixalc%3
>>>> D&reserved=0
>>>> Diff:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7C%7C
>>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>> 0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwop5J4
>>>> 7cIU%3D&reserved=0
>>>>
>>>> Branch: refs/heads/develop
>>>> Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>>>> Parents: 3891820
>>>> Author: Justin Mclean <[hidden email]>
>>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>>> Committer: Justin Mclean <[hidden email]>
>>>> Committed: Tue Jul 11 14:57:04 2017 +1000
>>>>
>>>> ----------------------------------------------------------------------
>>>> .../main/flex/org/apache/flex/html/accessories/ToolTipBead.as   | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2Fpro
>>>> jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Faccessori
>>>> es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768%7Cf
>>>> a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hifp5T8
>>>> xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> index 03ce21e..bdf0b68 100644
>>>> ---
>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> +++
>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> @@ -100,7 +100,10 @@ package org.apache.flex.html.accessories
>>>> * @private
>>>> */
>>>> protected function rollOverHandler( event:MouseEvent ):void
>>>> - {
>>>> + {
>>>> + if (!toolTip)
>>>> + return;
>>>> +
>>>>
>>>> IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT,
>>>> rollOutHandler, false);
>>>>
>>>>           var comp:IUIBase = _strand as IUIBase
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

Justin Mclean
Administrator
In reply to this post by piotrz
Hi,

> Even if it's working now, Harbs did research and find out that MouseEnter is
> a better for that

You do understand that it’s still using the same event as before I didn’t change that.

> - For what element did you use tooltip ? Does it matter ?

Probably not but I was using an image.

> - " having the tooltip smaller than the object it sits " - Did you give
> tooltip some specific size ?

No you can’t (easily) size it. I just used a biggish image and a small tool tip i.e. toolTip=“tiny” vs a large tool tip i.e. toolTip=“This is a longer tool tip that overflows what it’s positioned over”.

Thanks,
Justin
Reply | Threaded
Open this post in threaded view
|

Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking

piotrz
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)

piotrz
In reply to this post by Harbs
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)

Harbs
Here is an example of what happens using rollOver and rollOut in Flash.[1]

It seems like the same as enter/leave in HTML.

[1]http://www.zedia.net/2008/difference-between-mouseeventroll_over-and-mouseeventmouse_over-in-as3/ <http://www.zedia.net/2008/difference-between-mouseeventroll_over-and-mouseeventmouse_over-in-as3/>

> On Jul 11, 2017, at 12:19 PM, piotrz <[hidden email]> wrote:
>
> Harbs,
>
> I have found following examples [1][2][3]. Maybe it will help us.
>
> [1]
> https://siongui.github.io/2012/08/07/javascript-compare-mouseenter-mouseleave-mouseover-mouseout/
> [2]
> https://siongui.github.io/code/javascript-mouseenter-mouseleave/mouseenterleave.html
> [3]
> https://siongui.github.io/code/javascript-mouseenter-mouseleave/mouseoverout.html
>
> Piotr
>
>
>
>
>
> -----
> Apache Flex PMC
> [hidden email]
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-5-git-commit-flex-asjs-refs-heads-develop-FLEX-35338-stop-cursor-from-spinning-CPU-from-spiking-tp63061p63080.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)

piotrz
It seems to. MouseOver is launching really often - Maybe Enter/Leave would be really better.
Need test to see whether we have same behavior having Enter/Leave as we have with MouseOver currently.

Thanks,
Piotr
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)

Harbs
mouseover is needed if you need bubbling. That’s sometimes the correct behavior.

> On Jul 11, 2017, at 1:19 PM, piotrz <[hidden email]> wrote:
>
> It seems to. MouseOver is launching really often - Maybe Enter/Leave would be
> really better.
> Need test to see whether we have same behavior having Enter/Leave as we have
> with MouseOver currently.
>
> Thanks,
> Piotr
>
>
>
> -----
> Apache Flex PMC
> [hidden email]
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Re-2-5-git-commit-flex-asjs-refs-heads-develop-FLEX-35338-stop-cursor-from-spinning-CPU-from-spiking-tp63061p63085.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

12