Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

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

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
> + positioner.style["pointer-events"] = "none”;

I think that should be positioner.style["pointerEvents"] = "none”;

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
Any reason you didn’t just add this to the constructor?

I think all you need is:
mouseEnabled = false;

In Flash, “element” is a pointer to “this”.

Thanks,
Harbs

> On Jul 13, 2017, at 10:16 AM, [hidden email] wrote:
>
> + COMPILE::SWF
> + override public function addedToParent():void
> + {
> + super.addedToParent();
> + (element as InteractiveObject).mouseEnabled = false;
> + }
> +

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Justin Mclean
Administrator
In reply to this post by Harbs
Hi

>> + positioner.style["pointer-events"] = "none”;
>
> I think that should be positioner.style["pointerEvents"] = "none”;

The style is "pointer-events" [1] so I’m not sure why you would use "pointerEvents”. I’ve tested ""pointer-events” and it works.

Thanks,
Justin


1. https://developer.mozilla.org/en/docs/Web/CSS/pointer-events
Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

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

> Any reason you didn’t just add this to the constructor?

PAYG - i.e. no need to do it until it added to the UI.

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

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
In reply to this post by Justin Mclean
When specifying css via javascript, the naming is different than specifying using CSS files.

I’d be *very* surprised if the code works as-is.

> On Jul 13, 2017, at 3:23 PM, Justin Mclean <[hidden email]> wrote:
>
> Hi
>
>>> + positioner.style["pointer-events"] = "none”;
>>
>> I think that should be positioner.style["pointerEvents"] = "none”;
>
> The style is "pointer-events" [1] so I’m not sure why you would use "pointerEvents”. I’ve tested ""pointer-events” and it works.
>
> Thanks,
> Justin
>
>
> 1. https://developer.mozilla.org/en/docs/Web/CSS/pointer-events

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
In reply to this post by Justin Mclean
I don’t see how this is PAYG. It’s more code for no reason.

> On Jul 13, 2017, at 3:25 PM, Justin Mclean <[hidden email]> wrote:
>
> Hi,
>
>> Any reason you didn’t just add this to the constructor?
>
> PAYG - i.e. no need to do it until it added to the UI.
>
> Thanks,
> Justin

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
In reply to this post by Harbs
More information here:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference <https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference>

> On Jul 13, 2017, at 4:48 PM, Harbs <[hidden email]> wrote:
>
> When specifying css via javascript, the naming is different than specifying using CSS files.
>
> I’d be *very* surprised if the code works as-is.
>
>> On Jul 13, 2017, at 3:23 PM, Justin Mclean <[hidden email]> wrote:
>>
>> Hi
>>
>>>> + positioner.style["pointer-events"] = "none”;
>>>
>>> I think that should be positioner.style["pointerEvents"] = "none”;
>>
>> The style is "pointer-events" [1] so I’m not sure why you would use "pointerEvents”. I’ve tested ""pointer-events” and it works.
>>
>> Thanks,
>> Justin
>>
>>
>> 1. https://developer.mozilla.org/en/docs/Web/CSS/pointer-events
>

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
Here’s a fiddle trying to set pointer-events in various ways. Only one (with dot notation) works:
https://jsfiddle.net/Harbs/9c8zezx5/ <https://jsfiddle.net/Harbs/9c8zezx5/>

> On Jul 13, 2017, at 5:51 PM, Harbs <[hidden email]> wrote:
>
> More information here:
> https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference <https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Properties_Reference>
>
>> On Jul 13, 2017, at 4:48 PM, Harbs <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> When specifying css via javascript, the naming is different than specifying using CSS files.
>>
>> I’d be *very* surprised if the code works as-is.
>>
>>> On Jul 13, 2017, at 3:23 PM, Justin Mclean <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> Hi
>>>
>>>>> + positioner.style["pointer-events"] = "none”;
>>>>
>>>> I think that should be positioner.style["pointerEvents"] = "none”;
>>>
>>> The style is "pointer-events" [1] so I’m not sure why you would use "pointerEvents”. I’ve tested ""pointer-events” and it works.
>>>
>>> Thanks,
>>> Justin
>>>
>>>
>>> 1. https://developer.mozilla.org/en/docs/Web/CSS/pointer-events <https://developer.mozilla.org/en/docs/Web/CSS/pointer-events>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Alex Harui-2
IIRC, style["pointer-events"] works in some browsers but not all.

Anyway, this is quite a bit of new code.  The old bead should have been
preserved and given a name like ToolTipsOnRightBottomBead and the existing
examples updated to use it.

I would also recommend using large numbers for the constants.  It isn't
clear I can position a tooltip at 2,0 the way the code is written now.

Thanks,
-Alex

On 7/13/17, 8:16 AM, "Harbs" <[hidden email]> wrote:

>Here’s a fiddle trying to set pointer-events in various ways. Only one
>(with dot notation) works:
>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjsfiddle.
>net%2FHarbs%2F9c8zezx5%2F&data=02%7C01%7C%7C8f52afd516cb4676154e08d4ca021b
>30%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636355557782259195&sdata=v
>umqhweIzZLNFozgADtC3Hn%2B71kZ1BTcBcb6JyUjY4o%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjsfiddle
>.net%2FHarbs%2F9c8zezx5%2F&data=02%7C01%7C%7C8f52afd516cb4676154e08d4ca021
>b30%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636355557782259195&sdata=
>vumqhweIzZLNFozgADtC3Hn%2B71kZ1BTcBcb6JyUjY4o%3D&reserved=0>
>
>> On Jul 13, 2017, at 5:51 PM, Harbs <[hidden email]> wrote:
>>
>> More information here:
>>
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelope
>>r.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2FCSS_Properties_Reference&data=
>>02%7C01%7C%7C8f52afd516cb4676154e08d4ca021b30%7Cfa7b1b5a7b34438794aed2c17
>>8decee1%7C0%7C0%7C636355557782259195&sdata=0JEjaPFP%2FrB7s39JK8%2FKU8izCK
>>c12TkKOL57ND2f0ho%3D&reserved=0
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelop
>>er.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FCSS%2FCSS_Properties_Reference&data
>>=02%7C01%7C%7C8f52afd516cb4676154e08d4ca021b30%7Cfa7b1b5a7b34438794aed2c1
>>78decee1%7C0%7C0%7C636355557782259195&sdata=0JEjaPFP%2FrB7s39JK8%2FKU8izC
>>Kc12TkKOL57ND2f0ho%3D&reserved=0>
>>
>>> On Jul 13, 2017, at 4:48 PM, Harbs <[hidden email]
>>><mailto:[hidden email]>> wrote:
>>>
>>> When specifying css via javascript, the naming is different than
>>>specifying using CSS files.
>>>
>>> I’d be *very* surprised if the code works as-is.
>>>
>>>> On Jul 13, 2017, at 3:23 PM, Justin Mclean <[hidden email]
>>>><mailto:[hidden email]>> wrote:
>>>>
>>>> Hi
>>>>
>>>>>> + positioner.style["pointer-events"] = "none”;
>>>>>
>>>>> I think that should be positioner.style["pointerEvents"] = "none”;
>>>>
>>>> The style is "pointer-events" [1] so I’m not sure why you would use
>>>>"pointerEvents”. I’ve tested ""pointer-events” and it works.
>>>>
>>>> Thanks,
>>>> Justin
>>>>
>>>>
>>>> 1.
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelo
>>>>per.mozilla.org%2Fen%2Fdocs%2FWeb%2FCSS%2Fpointer-events&data=02%7C01%7
>>>>C%7C8f52afd516cb4676154e08d4ca021b30%7Cfa7b1b5a7b34438794aed2c178decee1
>>>>%7C0%7C0%7C636355557782259195&sdata=H9pPdrZ7iXlpfO2OKgZJaLuynAnYhTiRk59
>>>>%2BVSEZyiE%3D&reserved=0
>>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevel
>>>>oper.mozilla.org%2Fen%2Fdocs%2FWeb%2FCSS%2Fpointer-events&data=02%7C01%
>>>>7C%7C8f52afd516cb4676154e08d4ca021b30%7Cfa7b1b5a7b34438794aed2c178decee
>>>>1%7C0%7C0%7C636355557782259195&sdata=H9pPdrZ7iXlpfO2OKgZJaLuynAnYhTiRk5
>>>>9%2BVSEZyiE%3D&reserved=0>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
It did not work on any Mac browser. Don’t know about Windows.

> On Jul 13, 2017, at 8:26 PM, Alex Harui <[hidden email]> wrote:
>
> IIRC, style["pointer-events"] works in some browsers but not all.

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
In reply to this post by Alex Harui-2
Something that I keep forgetting to ask:

Do [Inspectable] meta tags work in FlexJS? I’m not sure how they worked in classic Flex, but having suggestions of possible values in an IDE was very helpful.

Josh, would something like that be possible in VS Code?

> On Jul 13, 2017, at 8:26 PM, Alex Harui <[hidden email]> wrote:
>
> I would also recommend using large numbers for the constants.  It isn't
> clear I can position a tooltip at 2,0 the way the code is written now.

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
In reply to this post by Alex Harui-2
Wouldn’t string constants be even clearer?

> On Jul 13, 2017, at 8:26 PM, Alex Harui <[hidden email]> wrote:
>
> I would also recommend using large numbers for the constants.

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Josh Tynjala
In reply to this post by Harbs
With classic Flex, I believe IDEs would check if the [Inspectable] metadata
had an enumeration field and provide those values as suggestions when a
property is used in MXML.

I've been meaning to add that feature to the VSCode extension. I just added
an issue to remind myself:

https://github.com/BowlerHatLLC/vscode-nextgenas/issues/106

- Josh

On Thu, Jul 13, 2017 at 10:38 AM, Harbs <[hidden email]> wrote:

> Something that I keep forgetting to ask:
>
> Do [Inspectable] meta tags work in FlexJS? I’m not sure how they worked in
> classic Flex, but having suggestions of possible values in an IDE was very
> helpful.
>
> Josh, would something like that be possible in VS Code?
>
> > On Jul 13, 2017, at 8:26 PM, Alex Harui <[hidden email]>
> wrote:
> >
> > I would also recommend using large numbers for the constants.  It isn't
> > clear I can position a tooltip at 2,0 the way the code is written now.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Alex Harui-2
In reply to this post by Harbs
Yes, but then you can't use "int" for xpos/ypos and open the door to more
bad inputs.  Either way is fine with me.

On 7/13/17, 10:39 AM, "Harbs" <[hidden email]> wrote:

>Wouldn’t string constants be even clearer?
>
>> On Jul 13, 2017, at 8:26 PM, Alex Harui <[hidden email]>
>>wrote:
>>
>> I would also recommend using large numbers for the constants.
>

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Justin Mclean
Administrator
In reply to this post by Alex Harui-2
Hi,

> IIRC, style["pointer-events"] works in some browsers but not all.

I tests on Firefox, Safari and Chrome on OSX and in all cases this failed to work:

style.pointerEvents = "none”;

and the other two styles did work.

Perhaps it’s different on windows?

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

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

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

> Wouldn’t string constants be even clearer?

I did consider that but they would come at increased cost in terms of code size.

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

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Harbs
In reply to this post by Justin Mclean
I’m not understanding. What worked and what didn’t?

In this fiddle: https://jsfiddle.net/Harbs/9c8zezx5/ <https://jsfiddle.net/Harbs/9c8zezx5/>

You should get an alert when clicking on every div except div1 (the top left one). Are you seeing something different?

> On Jul 14, 2017, at 12:52 AM, Justin Mclean <[hidden email]> wrote:
>
> Hi,
>
>> IIRC, style["pointer-events"] works in some browsers but not all.
>
> I tests on Firefox, Safari and Chrome on OSX and in all cases this failed to work:
>
> style.pointerEvents = "none”;
>
> and the other two styles did work.
>
> Perhaps it’s different on windows?
>
> Thanks,
> Justin

Reply | Threaded
Open this post in threaded view
|

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Justin Mclean
Administrator
Hi,

> I’m not understanding. What worked and what didn’t?

I’ll take a deeper look at it at the end of my work day.

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

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Justin Mclean
Administrator
Hi,

BTW the only other uses of pointer events in the code is in DragMouseConroller and it has:
COMPILE::JS {
   dragImage.element.style['pointer-events'] = 'none';
}

DisableBead which has:
COMPILE::JS {
   (_strand as Object).element.style.pointerEvents = disabled ? "none" : "";
}

And MXMLViewer which has:
element.style.pointerEvents = "none”;

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

Re: git commit: [flex-asjs] [refs/heads/develop] - added simple positioning to tool tip / make tool tip not react to mouse events

Greg Dove
In reply to this post by Harbs
Harbs I think that jsfiddle is not working because of the missing quotes in
the bracket access.

There are a bunch of uses of the bracket access throughout the framework,
including, iirc, some things like ['flex-basis'] etc.

imo, I agree these should be using the javascript camel case properties,
but perhaps we need to do a sweep through all the code for that.





On Fri, Jul 14, 2017 at 10:11 AM, Harbs <[hidden email]> wrote:

> I’m not understanding. What worked and what didn’t?
>
> In this fiddle: https://jsfiddle.net/Harbs/9c8zezx5/ <
> https://jsfiddle.net/Harbs/9c8zezx5/>
>
> You should get an alert when clicking on every div except div1 (the top
> left one). Are you seeing something different?
>
> > On Jul 14, 2017, at 12:52 AM, Justin Mclean <[hidden email]>
> wrote:
> >
> > Hi,
> >
> >> IIRC, style["pointer-events"] works in some browsers but not all.
> >
> > I tests on Firefox, Safari and Chrome on OSX and in all cases this
> failed to work:
> >
> > style.pointerEvents = "none”;
> >
> > and the other two styles did work.
> >
> > Perhaps it’s different on windows?
> >
> > Thanks,
> > Justin
>
>
12