You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2017/07/11 05:40:28 UTC
[1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place
tool tip anchor point in the centre rather than the bottom right
Repository: flex-asjs
Updated Branches:
refs/heads/develop e93c11d7c -> 1d73de00b
FLEX-35337 place tool tip anchor point in the centre rather than the bottom right
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/38918204
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/38918204
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/38918204
Branch: refs/heads/develop
Commit: 3891820488387121767c92e1cf9c132f6e858496
Parents: 54d00a0
Author: Justin Mclean <jm...@apache.org>
Authored: Tue Jul 11 14:43:29 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue Jul 11 14:43:29 2017 +1000
----------------------------------------------------------------------
.../src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/38918204/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
----------------------------------------------------------------------
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 64d04bf..03ce21e 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
@@ -122,7 +122,7 @@ package org.apache.flex.html.accessories
protected function determinePosition(event:MouseEvent, base:Object):Point
{
var comp:IUIBase = _strand as IUIBase;
- var pt:Point = new Point(comp.width, comp.height);
+ var pt:Point = new Point(comp.width/2, comp.height/2);
pt = PointUtils.localToGlobal(pt, comp);
return pt;
}
[4/5] git commit: [flex-asjs] [refs/heads/develop] - Add alt bead for
images alt tag on JS / tooltip on AS
Posted by jm...@apache.org.
Add alt bead for images alt tag on JS / tooltip on AS
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/eafb8111
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/eafb8111
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/eafb8111
Branch: refs/heads/develop
Commit: eafb81111b556e413d314d4826ef3f16eac63df8
Parents: c0d218f
Author: Justin Mclean <jm...@apache.org>
Authored: Tue Jul 11 15:40:05 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue Jul 11 15:40:05 2017 +1000
----------------------------------------------------------------------
.../flex/html/beads/AccessibilityAltBead.as | 114 +++++++++++++++++++
.../Basic/src/main/resources/basic-manifest.xml | 1 +
2 files changed, 115 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eafb8111/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccessibilityAltBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccessibilityAltBead.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccessibilityAltBead.as
new file mode 100644
index 0000000..3bb3580
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccessibilityAltBead.as
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.ValueEvent;
+
+ COMPILE::SWF {
+ import org.apache.flex.html.accessories.ToolTipBead;
+ }
+
+/**
+ * The AccessibilityAltBead class is a bead that can be used with
+ * any Image control. The bead places add an alt text attribute
+ * on a image.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.9
+ */
+ public class AccessibilityAltBead implements IBead
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.9
+ */
+ public function AccessibilityAltBead()
+ {
+ }
+
+ private var _strand:IStrand;
+ private var _alt:String;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.9
+ * @flexjsignorecoercion HTMLInputElement
+ * @flexjsignorecoercion org.apache.flex.core.UIBase;
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ updateHost();
+ }
+
+ public function get alt():String
+ {
+ return _alt;
+ }
+
+ /**
+ * @private
+ */
+ public function set alt(value:String):void
+ {
+ if (value != _alt)
+ {
+ _alt = value;
+ updateHost();
+ }
+ }
+
+ private function updateHost():void
+ {
+ if(!_strand)
+ return;
+
+ COMPILE::SWF {
+ //TODO may want to do something else on he AS side
+ var toolTip:ToolTipBead = _strand.getBeadByType(ToolTipBead) as ToolTipBead;
+
+ if (toolTip) {
+ toolTip.toolTip = _alt;
+ }
+ }
+
+ COMPILE::JS {
+ (_strand as Object).element.alt = _alt;
+ }
+
+ IEventDispatcher(_strand).dispatchEvent(new ValueEvent("altChange", alt));
+
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eafb8111/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index 3908e93..625f9bc 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -79,6 +79,7 @@
<component id="ListView" class="org.apache.flex.html.beads.ListView"/>
<component id="AccordionView" class="org.apache.flex.html.beads.AccordionView"/>
<component id="CenterElement" class="org.apache.flex.html.beads.CenterElement"/>
+ <component id="AccessibilityAltBead" class="org.apache.flex.html.beads.AccessibilityAltBead" />
<!--<component id="MultilineTextFieldView" class="org.apache.flex.html.beads.MultilineTextFieldView"/>-->
<component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert"/>
[5/5] git commit: [flex-asjs] [refs/heads/develop] - Merge branch
'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop
Posted by jm...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1d73de00
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1d73de00
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1d73de00
Branch: refs/heads/develop
Commit: 1d73de00b5235161ecc7777c24870169b484ed32
Parents: eafb811 e93c11d
Author: Justin Mclean <jm...@apache.org>
Authored: Tue Jul 11 15:40:17 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue Jul 11 15:40:17 2017 +1000
----------------------------------------------------------------------
.../flex/file/beads/FileLoaderAndUploader.as | 23 ++++++++++++--------
1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
To be clear: That css should be applied to the ToolTip element.
> On Jul 11, 2017, at 6:54 PM, Harbs <ha...@gmail.com> wrote:
>
> pointer-events:none;
>
> Definitely the right way to go.
>
>> On Jul 11, 2017, at 6:01 PM, piotrz <pi...@gmail.com> wrote:
>>
>> Alex,
>>
>> What do you mean by Mouse "transparent" ? We still need to use some event
>> mouse (enter/leave) where after roll over on the element tooltip should be
>> shown.
>>
>> Piotr
>>
>>
>>
>>
>>
>> -----
>> Apache Flex PMC
>> piotrzarzycki21@gmail.com
>> --
>> 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-tp63061p63099.html
>> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
pointer-events:none;
Definitely the right way to go.
> On Jul 11, 2017, at 6:01 PM, piotrz <pi...@gmail.com> wrote:
>
> Alex,
>
> What do you mean by Mouse "transparent" ? We still need to use some event
> mouse (enter/leave) where after roll over on the element tooltip should be
> shown.
>
> Piotr
>
>
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> 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-tp63061p63099.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> Maybe I'm not understanding the scenario. I assumed that the problem
> Justin is trying to fix is that you roll over a component, the component
> shows a tooltip, but the tooltip appears under the mouse so you get a
> rollout of the component and rollover the tooltip. The rollout of the
> component causes the tooltip to go away resulting in a rollover of the
> component which causes the component to show a tooltip, and so on.
That’s one of the problems yes.
> If the tooltip cannot be a target for mouse events (mouseEnabled=false in
> Flash and I think it is "pointer-events:none" in JS) then I think the
> tooltip will not cause a rollout on the component when it appears under
> the mouse.
Certainly worth investigating. There may still be an issue here if you roll off over the tool tip in the case where it goes beyond the boundary of the component but not sure.
Thanks,
Justin
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Piotr,
Maybe I'm not understanding the scenario. I assumed that the problem
Justin is trying to fix is that you roll over a component, the component
shows a tooltip, but the tooltip appears under the mouse so you get a
rollout of the component and rollover the tooltip. The rollout of the
component causes the tooltip to go away resulting in a rollover of the
component which causes the component to show a tooltip, and so on.
If the tooltip cannot be a target for mouse events (mouseEnabled=false in
Flash and I think it is "pointer-events:none" in JS) then I think the
tooltip will not cause a rollout on the component when it appears under
the mouse.
One reason for tooltips to be in a bead is because there can be many
different implementations. The one that currently exists is as simple as
possible. There is no delay between rollover and showing the tooltip.
There is no "scrubbing" support where you roll from one button to the next
in a ButtonBar. It doesn't support interactive tooltips that do want to
be mouse targets. There is no logic for smart positioning of the tooltip.
All of these options will hopefully be implemented by volunteers in a
PAYG fashion.
Thanks,
-Alex
On 7/11/17, 8:01 AM, "piotrz" <pi...@gmail.com> wrote:
>Alex,
>
>What do you mean by Mouse "transparent" ? We still need to use some event
>mouse (enter/leave) where after roll over on the element tooltip should be
>shown.
>
>Piotr
>
>
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.2333347.n4.nabble.com%2FRe-2-5-git-commit-flex-asjs-refs-hea
>ds-develop-FLEX-35338-stop-cursor-from-spinning-CPU-from-spiking-tp63061p6
>3099.html&data=02%7C01%7C%7C232a34024264401d485608d4c872f6df%7Cfa7b1b5a7b3
>4438794aed2c178decee1%7C0%7C0%7C636353843465345667&sdata=QC3t2Y3rI%2BVyBvA
>KcjqwnoIilH5TLLkQ%2FBTODiQmEv4%3D&reserved=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by piotrz <pi...@gmail.com>.
Alex,
What do you mean by Mouse "transparent" ? We still need to use some event
mouse (enter/leave) where after roll over on the element tooltip should be
shown.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
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-tp63061p63099.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
That should have been MOUSE_ENTER rather than MOUSE_OVER.
> On Jul 11, 2017, at 6:58 PM, Harbs <ha...@gmail.com> wrote:
>
> It’s been supported by every browser since 2014. I think we should switch to that.
>
> I was pondering whether we should standardize on ROLL_OVER or MOUSE_OVER. I was thinking that we could have both.
>
>> On Jul 11, 2017, at 6:14 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
>>
>> At one point in time, mouseenter was only supported by IE. If we agree it
>> is safe to use on all of our target browsers, we can switch to using it.
>>
>> I don't think it will solve the flicker problem. I think the tooltips
>> need to be "mouse transparent".
>>
>> My 2 cents,
>> -Alex
>>
>> On 7/11/17, 4:32 AM, "Harbs" <ha...@gmail.com> wrote:
>>
>>> My point with tooltip is that you probably don’t need bubbling for
>>> tooltips and it causes more events than are needed.
>>>
>>> There’s use cases for both mouseover and mouseenter.
>>>
>>> Resolving Justin’s issues using mouseenter would require a couple of
>>> things:
>>> 1, We would need mouseeenter (and mouseleave) events and not custom
>>> ROLL_OVER events
>>> 2. The tooltip would need to be a descendant of the element which has the
>>> mouseenter event attached to it. Otherwise, you’d get mouseleave events
>>> when the mouse rolls over the tooltip.
>>>
>>> Fixing those two things seems to me like the ideal way to resolve the
>>> performance issues.
>>>
>>> My question here is why are we not using the standard mouseenter and are
>>> using a hacky solution for custom ROLL_OVER events instead.
>>>
>>> I think Alex wrote that code, so I’m going to wait until he can respond.
>>>
>>> Thanks,
>>> Harbs
>>>
>>>> On Jul 11, 2017, at 1:50 PM, piotrz <pi...@gmail.com> wrote:
>>>>
>>>> Ahh..Yes. Maybe let's live it as is. Maybe if you will use in your app
>>>> tooltips more extensively we will see.
>>>>
>>>> Piotr
>>>>
>>>>
>>>>
>>>> -----
>>>> Apache Flex PMC
>>>> piotrzarzycki21@gmail.com
>>>> --
>>>> View this message in context:
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>>> ex-development.2333347.n4.nabble.com%2FRe-2-5-git-commit-flex-asjs-refs-h
>>>> eads-develop-FLEX-35338-stop-cursor-from-spinning-CPU-from-spiking-tp6306
>>>> 1p63087.html&data=02%7C01%7C%7Cbed16583edd74d4d2a0708d4c860cd33%7Cfa7b1b5
>>>> a7b34438794aed2c178decee1%7C0%7C0%7C636353765461900518&sdata=Ia2G2yNdIScR
>>>> cThmf9qfrnp%2Bue%2BkEvCmFDEooPHgnwo%3D&reserved=0
>>>> Sent from the Apache Flex Development mailing list archive at
>>>> Nabble.com.
>>>
>>
>
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
It’s been supported by every browser since 2014. I think we should switch to that.
I was pondering whether we should standardize on ROLL_OVER or MOUSE_OVER. I was thinking that we could have both.
> On Jul 11, 2017, at 6:14 PM, Alex Harui <ah...@adobe.com.INVALID> wrote:
>
> At one point in time, mouseenter was only supported by IE. If we agree it
> is safe to use on all of our target browsers, we can switch to using it.
>
> I don't think it will solve the flicker problem. I think the tooltips
> need to be "mouse transparent".
>
> My 2 cents,
> -Alex
>
> On 7/11/17, 4:32 AM, "Harbs" <ha...@gmail.com> wrote:
>
>> My point with tooltip is that you probably don’t need bubbling for
>> tooltips and it causes more events than are needed.
>>
>> There’s use cases for both mouseover and mouseenter.
>>
>> Resolving Justin’s issues using mouseenter would require a couple of
>> things:
>> 1, We would need mouseeenter (and mouseleave) events and not custom
>> ROLL_OVER events
>> 2. The tooltip would need to be a descendant of the element which has the
>> mouseenter event attached to it. Otherwise, you’d get mouseleave events
>> when the mouse rolls over the tooltip.
>>
>> Fixing those two things seems to me like the ideal way to resolve the
>> performance issues.
>>
>> My question here is why are we not using the standard mouseenter and are
>> using a hacky solution for custom ROLL_OVER events instead.
>>
>> I think Alex wrote that code, so I’m going to wait until he can respond.
>>
>> Thanks,
>> Harbs
>>
>>> On Jul 11, 2017, at 1:50 PM, piotrz <pi...@gmail.com> wrote:
>>>
>>> Ahh..Yes. Maybe let's live it as is. Maybe if you will use in your app
>>> tooltips more extensively we will see.
>>>
>>> Piotr
>>>
>>>
>>>
>>> -----
>>> Apache Flex PMC
>>> piotrzarzycki21@gmail.com
>>> --
>>> View this message in context:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>> ex-development.2333347.n4.nabble.com%2FRe-2-5-git-commit-flex-asjs-refs-h
>>> eads-develop-FLEX-35338-stop-cursor-from-spinning-CPU-from-spiking-tp6306
>>> 1p63087.html&data=02%7C01%7C%7Cbed16583edd74d4d2a0708d4c860cd33%7Cfa7b1b5
>>> a7b34438794aed2c178decee1%7C0%7C0%7C636353765461900518&sdata=Ia2G2yNdIScR
>>> cThmf9qfrnp%2Bue%2BkEvCmFDEooPHgnwo%3D&reserved=0
>>> Sent from the Apache Flex Development mailing list archive at
>>> Nabble.com.
>>
>
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Alex Harui <ah...@adobe.com.INVALID>.
At one point in time, mouseenter was only supported by IE. If we agree it
is safe to use on all of our target browsers, we can switch to using it.
I don't think it will solve the flicker problem. I think the tooltips
need to be "mouse transparent".
My 2 cents,
-Alex
On 7/11/17, 4:32 AM, "Harbs" <ha...@gmail.com> wrote:
>My point with tooltip is that you probably don’t need bubbling for
>tooltips and it causes more events than are needed.
>
>There’s use cases for both mouseover and mouseenter.
>
>Resolving Justin’s issues using mouseenter would require a couple of
>things:
>1, We would need mouseeenter (and mouseleave) events and not custom
>ROLL_OVER events
>2. The tooltip would need to be a descendant of the element which has the
>mouseenter event attached to it. Otherwise, you’d get mouseleave events
>when the mouse rolls over the tooltip.
>
>Fixing those two things seems to me like the ideal way to resolve the
>performance issues.
>
>My question here is why are we not using the standard mouseenter and are
>using a hacky solution for custom ROLL_OVER events instead.
>
>I think Alex wrote that code, so I’m going to wait until he can respond.
>
>Thanks,
>Harbs
>
>> On Jul 11, 2017, at 1:50 PM, piotrz <pi...@gmail.com> wrote:
>>
>> Ahh..Yes. Maybe let's live it as is. Maybe if you will use in your app
>> tooltips more extensively we will see.
>>
>> Piotr
>>
>>
>>
>> -----
>> Apache Flex PMC
>> piotrzarzycki21@gmail.com
>> --
>> View this message in context:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-development.2333347.n4.nabble.com%2FRe-2-5-git-commit-flex-asjs-refs-h
>>eads-develop-FLEX-35338-stop-cursor-from-spinning-CPU-from-spiking-tp6306
>>1p63087.html&data=02%7C01%7C%7Cbed16583edd74d4d2a0708d4c860cd33%7Cfa7b1b5
>>a7b34438794aed2c178decee1%7C0%7C0%7C636353765461900518&sdata=Ia2G2yNdIScR
>>cThmf9qfrnp%2Bue%2BkEvCmFDEooPHgnwo%3D&reserved=0
>> Sent from the Apache Flex Development mailing list archive at
>>Nabble.com.
>
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
My point with tooltip is that you probably don’t need bubbling for tooltips and it causes more events than are needed.
There’s use cases for both mouseover and mouseenter.
Resolving Justin’s issues using mouseenter would require a couple of things:
1, We would need mouseeenter (and mouseleave) events and not custom ROLL_OVER events
2. The tooltip would need to be a descendant of the element which has the mouseenter event attached to it. Otherwise, you’d get mouseleave events when the mouse rolls over the tooltip.
Fixing those two things seems to me like the ideal way to resolve the performance issues.
My question here is why are we not using the standard mouseenter and are using a hacky solution for custom ROLL_OVER events instead.
I think Alex wrote that code, so I’m going to wait until he can respond.
Thanks,
Harbs
> On Jul 11, 2017, at 1:50 PM, piotrz <pi...@gmail.com> wrote:
>
> Ahh..Yes. Maybe let's live it as is. Maybe if you will use in your app
> tooltips more extensively we will see.
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> 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-tp63061p63087.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by piotrz <pi...@gmail.com>.
Ahh..Yes. Maybe let's live it as is. Maybe if you will use in your app
tooltips more extensively we will see.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
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-tp63061p63087.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
mouseover is needed if you need bubbling. That’s sometimes the correct behavior.
> On Jul 11, 2017, at 1:19 PM, piotrz <pi...@gmail.com> 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
> piotrzarzycki21@gmail.com
> --
> 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.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by piotrz <pi...@gmail.com>.
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
piotrzarzycki21@gmail.com
--
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.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
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 <pi...@gmail.com> 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
> piotrzarzycki21@gmail.com
> --
> 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.
Re: [FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by piotrz <pi...@gmail.com>.
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
piotrzarzycki21@gmail.com
--
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.
[FlexJS]MouseEvent.ROLL_OVER (was Re: [2/5] git commit...)
Posted by Harbs <ha...@gmail.com>.
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 <ha...@gmail.com> 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 <harbs.lists@gmail.com <ma...@gmail.com>> 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 <aharui@adobe.com <ma...@adobe.com>> 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, "jmclean@apache.org <ma...@apache.org>" <jmclean@apache.org <ma...@apache.org>> 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 <jm...@apache.org>
>>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>>> Committer: Justin Mclean <jm...@apache.org>
>>>> 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
>>>>
>>>
>>
>
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Alex Harui <ah...@adobe.com.INVALID>.
The browser does not support RollOver/RollOut so we are running code to
emulate it, so wouldn't worry about the performance. The browser's
implementation is likely faster than our JS implementation. Back when I
wrote this code, it wasn't clear that we could use mouseEnter/mouseLeave.
If folks agree that we can, then we can save a some code.
If we decide to use mouseEnter/mouseLeave we also need to decide whether
to stick with the Flex names of rollOver/rollOut or go with
mouseEnter/mouseLeave. Already, all mouse events have different
capitalization of the event name (mouseDown vs mousedown) so folks "must"
use the event constants and not quoted strings in their code.
But it definitely sounds like this change is "just-in-case" code. When
writing framework code, especially for FlexJS, we need to not just fix
whatever problem you are working on, but also consider the impact on all
other users of the framework code. When writing application code, I'm
also prone to writing the quick fix if I'm not concerned about code
re-use. But in framework code, we are "always" concerned about code
re-use. We have to fix the right problem. I'm thinking the actual
problem is that the tooltip is a live mouse target. The right fix might
just be to make sure the tooltips are "transparent" to the mouse.
Thoughts?
-Alex
On 7/11/17, 1:02 AM, "Harbs" <ha...@gmail.com> wrote:
>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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.qu
>irksmode.org%2Fjs%2Fevents_mouse.html&data=02%7C01%7C%7C0aa7240c28324ace7a
>9008d4c8341bfb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63635357351272
>7427&sdata=ypCqQo8z6cbX01npatvfaWF6cW347gOjdhtgpfqIiiw%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.quir
>ksmode.org%2Fjs%2Fevents_mouse.html&data=02%7C01%7C%7C0aa7240c28324ace7a90
>08d4c8341bfb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363535735127274
>27&sdata=ypCqQo8z6cbX01npatvfaWF6cW347gOjdhtgpfqIiiw%3D&reserved=0>
>
>> On Jul 11, 2017, at 10:48 AM, Harbs <ha...@gmail.com> 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelope
>>r.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FEvents%2Fmouseenter&data=02%7C01%7C%
>>7C0aa7240c28324ace7a9008d4c8341bfb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0
>>%7C0%7C636353573512727427&sdata=PUExzeCEz0B6iWscUPz7WpebnTvI%2BNHL9VwSdUO
>>7fKU%3D&reserved=0
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelop
>>er.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FEvents%2Fmouseenter&data=02%7C01%7C
>>%7C0aa7240c28324ace7a9008d4c8341bfb%7Cfa7b1b5a7b34438794aed2c178decee1%7C
>>0%7C0%7C636353573512727427&sdata=PUExzeCEz0B6iWscUPz7WpebnTvI%2BNHL9VwSdU
>>O7fKU%3D&reserved=0>
>>
>> That does beg the question though: Are the MouseEvent constants wrong
>>for Javascript?
>>
>>
>>> On Jul 11, 2017, at 10:38 AM, Harbs <harbs.lists@gmail.com
>>><ma...@gmail.com>> 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 <aharui@adobe.com
>>>><ma...@adobe.com>> 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, "jmclean@apache.org
>>>><ma...@apache.org>" <jmclean@apache.org
>>>><ma...@apache.org>> wrote:
>>>>
>>>>> FLEX-35338 stop cursor from spinning / CPU from spiking
>>>>>
>>>>>
>>>>> Project:
>>>>>
>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wi
>>>>>p-us
>>>>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-w
>>>>>ip-us>
>>>>>
>>>>>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5
>>>>>b3b3
>>>>>
>>>>>54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636
>>>>>3534
>>>>>
>>>>>84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&r
>>>>>eser
>>>>> ved=0
>>>>> Commit:
>>>>>
>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wi
>>>>>p-us
>>>>>
>>>>>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01
>>>>>%7C%
>>>>>
>>>>>7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%
>>>>>7C0%
>>>>>
>>>>>7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2
>>>>>BAaq
>>>>> G280z0%3D&reserved=0
>>>>> Tree:
>>>>>
>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wi
>>>>>p-us
>>>>>
>>>>>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7
>>>>>C%7C
>>>>>
>>>>>8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C
>>>>>0%7C
>>>>>
>>>>>0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixa
>>>>>lc%3
>>>>> D&reserved=0
>>>>> Diff:
>>>>>
>>>>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wi
>>>>>p-us
>>>>>
>>>>>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7
>>>>>C%7C
>>>>>
>>>>>8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C
>>>>>0%7C
>>>>>
>>>>>0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwo
>>>>>p5J4
>>>>> 7cIU%3D&reserved=0
>>>>>
>>>>> Branch: refs/heads/develop
>>>>> Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>>>>> Parents: 3891820
>>>>> Author: Justin Mclean <jm...@apache.org>
>>>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>>>> Committer: Justin Mclean <jm...@apache.org>
>>>>> 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-wi
>>>>>p-us
>>>>>
>>>>>.apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2
>>>>>Fpro
>>>>>
>>>>>jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Facces
>>>>>sori
>>>>>
>>>>>es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768
>>>>>%7Cf
>>>>>
>>>>>a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hif
>>>>>p5T8
>>>>> xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>>>>>
>>>>>----------------------------------------------------------------------
>>>>> diff --git
>>>>>
>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accesso
>>>>>ries
>>>>> /ToolTipBead.as
>>>>>
>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accesso
>>>>>ries
>>>>> /ToolTipBead.as
>>>>> index 03ce21e..bdf0b68 100644
>>>>> ---
>>>>>
>>>>>a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accesso
>>>>>ries
>>>>> /ToolTipBead.as
>>>>> +++
>>>>>
>>>>>b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accesso
>>>>>ries
>>>>> /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
>>>>>
>>>>
>>>
>>
>
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking
Posted by Harbs <ha...@gmail.com>.
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 <ha...@gmail.com> 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 <harbs.lists@gmail.com <ma...@gmail.com>> 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 <aharui@adobe.com <ma...@adobe.com>> 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, "jmclean@apache.org <ma...@apache.org>" <jmclean@apache.org <ma...@apache.org>> 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 <jm...@apache.org>
>>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>>> Committer: Justin Mclean <jm...@apache.org>
>>>> 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
>>>>
>>>
>>
>
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking
Posted by Harbs <ha...@gmail.com>.
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 <ha...@gmail.com> 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 <ah...@adobe.com> 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, "jmclean@apache.org" <jm...@apache.org> 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 <jm...@apache.org>
>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>> Committer: Justin Mclean <jm...@apache.org>
>>> 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
>>>
>>
>
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by piotrz <pi...@gmail.com>.
Maybe worth to check how it is handled in MDL.
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
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-tp63061p63074.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking
Posted by Harbs <ha...@gmail.com>.
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 <ju...@classsoftware.com> 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
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by piotrz <pi...@gmail.com>.
Ok! Thanks!
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
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-tp63061p63079.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Justin Mclean <ju...@classsoftware.com>.
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
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by piotrz <pi...@gmail.com>.
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
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
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-tp63061p63072.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Justin Mclean <ju...@classsoftware.com>.
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
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking
Posted by Harbs <ha...@gmail.com>.
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 <ju...@classsoftware.com> 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
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Justin Mclean <ju...@classsoftware.com>.
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
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop cursor from spinning / CPU from spiking
Posted by Harbs <ha...@gmail.com>.
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 <ah...@adobe.com> 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, "jmclean@apache.org" <jm...@apache.org> 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 <jm...@apache.org>
>> Authored: Tue Jul 11 14:57:04 2017 +1000
>> Committer: Justin Mclean <jm...@apache.org>
>> 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
>>
>
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Alex Harui <ah...@adobe.com>.
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, "jmclean@apache.org" <jm...@apache.org> 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 <jm...@apache.org>
>Authored: Tue Jul 11 14:57:04 2017 +1000
>Committer: Justin Mclean <jm...@apache.org>
>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
>
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Alex Harui <ah...@adobe.com.INVALID>.
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" <jm...@apache.org> wrote:
>Hi,
>
>And my last check has fixed the issue so should be all good.
>
>Thanks,
>Justin
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Justin Mclean <jm...@apache.org>.
Hi,
And my last check has fixed the issue so should be all good.
Thanks,
Justin
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Justin Mclean <jm...@apache.org>.
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
Re: [2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338
stop cursor from spinning / CPU from spiking
Posted by Alex Harui <ah...@adobe.com.INVALID>.
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, "jmclean@apache.org" <jm...@apache.org> 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 <jm...@apache.org>
>Authored: Tue Jul 11 14:57:04 2017 +1000
>Committer: Justin Mclean <jm...@apache.org>
>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
>
[2/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35338 stop
cursor from spinning / CPU from spiking
Posted by jm...@apache.org.
FLEX-35338 stop cursor from spinning / CPU from spiking
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/549a10d8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/549a10d8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/549a10d8
Branch: refs/heads/develop
Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
Parents: 3891820
Author: Justin Mclean <jm...@apache.org>
Authored: Tue Jul 11 14:57:04 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
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(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/549a10d8/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
----------------------------------------------------------------------
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
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337
place tool tip anchor point in the centre rather than the bottom right
Posted by Alex Harui <ah...@adobe.com.INVALID>.
I think we need both.
I'm not sure if x,y will work on a row of buttons with different widths.
Maybe the position can be expressed in CSS?
-Alex
On 7/11/17, 11:50 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>Hi,
>
>1.
>> Yes, I think we need more variants.
>
>2.
>> Maybe the default tooltip bead should be slightly fatter and have x/y
>>offsets or some other way to dictate the
>> relative position.
>
>Which do you prefer 1 or 2 for the current ToolTip?
>
>Either having a position of combination “left, right, top, bottom,
>centre” OR a x and y absolute or % would be easy to implement and not
>too fat.
>
>Thanks,
>Justin
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337
place tool tip anchor point in the centre rather than the bottom right
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
1.
> Yes, I think we need more variants.
2.
> Maybe the default tooltip bead should be slightly fatter and have x/y offsets or some other way to dictate the
> relative position.
Which do you prefer 1 or 2 for the current ToolTip?
Either having a position of combination “left, right, top, bottom, centre” OR a x and y absolute or % would be easy to implement and not too fat.
Thanks,
Justin
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337
place tool tip anchor point in the centre rather than the bottom right
Posted by Alex Harui <ah...@adobe.com.INVALID>.
Yes, I think we need more variants. Maybe the default tooltip bead should
be slightly fatter and have x/y offsets or some other way to dictate the
relative position. There is no one right answer. But changing code that
is being used in the examples is not a good practice.
Framework developers must learn to think about more than just the one
scenario they are working with.
Thanks,
-Alex
On 7/11/17, 4:08 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>Hi,
>
>> Why are you assuming that this behavior is wrong?
>
>Because if you have two components side by side and mouse over the first
>one the tool tip appears below the second one. If you have something on
>the right of the screen and roll over it you can’t see any tooltip. If
>you have something at the bottom of the screen and roll over it you can’t
>see any tooltip.
>
>> Don’t you think a functional change should require discussion?
>
>If you think it does please re open the JIRA and let's discuss.
>
>One possibly would be to have two beads <ToolTipBottmLeftBead> and
><ToolTipCentreBead> if it’s not clear what the default placement should
>be.
>
>Thanks,
>Justin
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place tool tip anchor point in the centre rather than the bottom right
Posted by Harbs <ha...@gmail.com>.
> On Jul 13, 2017, at 7:21 AM, Justin Mclean <ju...@classsoftware.com> wrote:
>
> Hi,
>
>> I noticed today that I was actually using ToolTips and your changes make my buttons very difficult to use as they are significantly obscured by the tooltips. Also, the tooltips are now under the mouse, so the text in not legible until you move the mouse out of the way. On small buttons this makes the tooltip disappear.
>
> Seems like reason enough to revert the position change. I’ll change the bead so you have some control over the position as neither default seems ideal.
Thanks.
> The flicker is only an issue because the tooltips are partially obscuring the buttons and your code does not seem to resolve the flickering either.
>
> The fixes I put were for the AS side. On the JS side there still an issue a labels and mouse over don’t play well together and it happen when you mouse over the text pixel and not the background pixels. We have the same issue when trying to click on a label, this has come up beforehand is due to a change in the SDK but I couldn’t find where it was discussed.
Alex’s suggestion to make it “mouse invisible” should resolve this.
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337
place tool tip anchor point in the centre rather than the bottom right
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> I noticed today that I was actually using ToolTips and your changes make my buttons very difficult to use as they are significantly obscured by the tooltips. Also, the tooltips are now under the mouse, so the text in not legible until you move the mouse out of the way. On small buttons this makes the tooltip disappear.
Seems like reason enough to revert the position change. I’ll change the bead so you have some control over the position as neither default seems ideal.
> The flicker is only an issue because the tooltips are partially obscuring the buttons and your code does not seem to resolve the flickering either.
The fixes I put were for the AS side. On the JS side there still an issue a labels and mouse over don’t play well together and it happen when you mouse over the text pixel and not the background pixels. We have the same issue when trying to click on a label, this has come up beforehand is due to a change in the SDK but I couldn’t find where it was discussed.
Thanks,
Justin
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place tool tip anchor point in the centre rather than the bottom right
Posted by Harbs <ha...@gmail.com>.
FYI:
I noticed today that I was actually using ToolTips and your changes make my buttons very difficult to use as they are significantly obscured by the tooltips. Also, the tooltips are now under the mouse, so the text in not legible until you move the mouse out of the way. On small buttons this makes the tooltip disappear.
The flicker is only an issue because the tooltips are partially obscuring the buttons and your code does not seem to resolve the flickering either. Additionally, mouse-down events when the mouse is over the tooltip are not dispatched on the button.
In short: As it stands, the tooltips are significantly less useable than they were before your changes.
Thanks,
Harbs
> On Jul 12, 2017, at 2:08 AM, Justin Mclean <ju...@classsoftware.com> wrote:
>
> Hi,
>
>> Why are you assuming that this behavior is wrong?
>
> Because if you have two components side by side and mouse over the first one the tool tip appears below the second one. If you have something on the right of the screen and roll over it you can’t see any tooltip. If you have something at the bottom of the screen and roll over it you can’t see any tooltip.
>
>> Don’t you think a functional change should require discussion?
>
> If you think it does please re open the JIRA and let's discuss.
>
> One possibly would be to have two beads <ToolTipBottmLeftBead> and <ToolTipCentreBead> if it’s not clear what the default placement should be.
>
> Thanks,
> Justin
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337
place tool tip anchor point in the centre rather than the bottom right
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> Why are you assuming that this behavior is wrong?
Because if you have two components side by side and mouse over the first one the tool tip appears below the second one. If you have something on the right of the screen and roll over it you can’t see any tooltip. If you have something at the bottom of the screen and roll over it you can’t see any tooltip.
> Don’t you think a functional change should require discussion?
If you think it does please re open the JIRA and let's discuss.
One possibly would be to have two beads <ToolTipBottmLeftBead> and <ToolTipCentreBead> if it’s not clear what the default placement should be.
Thanks,
Justin
Re: [1/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35337 place tool tip anchor point in the centre rather than the bottom right
Posted by Harbs <ha...@gmail.com>.
Why are you assuming that this behavior is wrong?
Don’t you think a functional change should require discussion?
Thanks,
Harbs
> On Jul 11, 2017, at 8:40 AM, jmclean@apache.org wrote:
>
> Repository: flex-asjs
> Updated Branches:
> refs/heads/develop e93c11d7c -> 1d73de00b
>
>
> FLEX-35337 place tool tip anchor point in the centre rather than the bottom right
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/38918204
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/38918204
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/38918204
>
> Branch: refs/heads/develop
> Commit: 3891820488387121767c92e1cf9c132f6e858496
> Parents: 54d00a0
> Author: Justin Mclean <jm...@apache.org>
> Authored: Tue Jul 11 14:43:29 2017 +1000
> Committer: Justin Mclean <jm...@apache.org>
> Committed: Tue Jul 11 14:43:29 2017 +1000
>
> ----------------------------------------------------------------------
> .../src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/38918204/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
> ----------------------------------------------------------------------
> 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 64d04bf..03ce21e 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
> @@ -122,7 +122,7 @@ package org.apache.flex.html.accessories
> protected function determinePosition(event:MouseEvent, base:Object):Point
> {
> var comp:IUIBase = _strand as IUIBase;
> - var pt:Point = new Point(comp.width, comp.height);
> + var pt:Point = new Point(comp.width/2, comp.height/2);
> pt = PointUtils.localToGlobal(pt, comp);
> return pt;
> }
>
[3/5] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35339 stop
tool tip flashing on and off like mad when you mouse over it
Posted by jm...@apache.org.
FLEX-35339 stop tool tip flashing on and off like mad when you mouse over it
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c0d218f5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c0d218f5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c0d218f5
Branch: refs/heads/develop
Commit: c0d218f5bf0e83d2f82fa1979aad0ff09b6317f2
Parents: 549a10d
Author: Justin Mclean <jm...@apache.org>
Authored: Tue Jul 11 15:36:05 2017 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Tue Jul 11 15:36:05 2017 +1000
----------------------------------------------------------------------
.../apache/flex/html/accessories/ToolTipBead.as | 47 +++++++++++---------
1 file changed, 25 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c0d218f5/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
----------------------------------------------------------------------
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 bdf0b68..b1f0620 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
@@ -18,26 +18,23 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.flex.html.accessories
{
-
+
import org.apache.flex.core.IBead;
import org.apache.flex.core.IPopUpHost;
import org.apache.flex.core.IStrand;
import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.Event;
import org.apache.flex.events.IEventDispatcher;
import org.apache.flex.events.MouseEvent;
- import org.apache.flex.events.utils.MouseUtils;
import org.apache.flex.geom.Point;
import org.apache.flex.html.ToolTip;
import org.apache.flex.utils.PointUtils;
import org.apache.flex.utils.UIUtils;
-
+
/**
* The ToolTipBead class is a specialty bead that can be used with
* any control. The bead floats a string over a control if
* the user hovers over the control with a mouse.
- *
+ *
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
@@ -56,9 +53,9 @@ package org.apache.flex.html.accessories
public function ToolTipBead()
{
}
-
+
private var _toolTip:String;
-
+
/**
* The string to use as the toolTip.
*
@@ -75,12 +72,12 @@ package org.apache.flex.html.accessories
{
_toolTip = value;
}
-
+
private var _strand:IStrand;
-
+
/**
* @copy org.apache.flex.core.IBead#strand
- *
+ *
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
@@ -92,32 +89,34 @@ package org.apache.flex.html.accessories
IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OVER, rollOverHandler, false);
}
-
+
private var tt:ToolTip;
private var host:IPopUpHost;
-
+
/**
* @private
*/
protected function rollOverHandler( event:MouseEvent ):void
{
- if (!toolTip)
+ if (!toolTip || tt)
return;
IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT, rollOutHandler, false);
-
+
var comp:IUIBase = _strand as IUIBase
host = UIUtils.findPopUpHost(comp);
if (tt) host.removeElement(tt);
-
+
tt = new ToolTip();
tt.text = toolTip;
var pt:Point = determinePosition(event, event.target);
tt.x = pt.x;
tt.y = pt.y;
host.addElement(tt, false); // don't trigger a layout
+
+ tt.addEventListener(MouseEvent.MOUSE_OUT, rollOutHandler, false);
}
-
+
/**
* @private
* Determines the position of the toolTip.
@@ -129,16 +128,20 @@ package org.apache.flex.html.accessories
pt = PointUtils.localToGlobal(pt, comp);
return pt;
}
-
+
/**
* @private
*/
- private function rollOutHandler( event:MouseEvent ):void
- {
- if (tt) {
+ private function rollOutHandler(event:MouseEvent):void
+ {
+ var comp:IUIBase = _strand as IUIBase;
+ var outside:Boolean = event.clientX > comp.width || event.clientY > comp.height;
+ // check for outside otherwise tool tip itself with flash when you roll over it
+ if (tt && outside) {
host.removeElement(tt);
+ tt = null;
}
- tt = null;
}
}
}
+