You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2016/08/15 19:54:43 UTC
FlexJS mouseEnabled
I can’t find any way in FlexJS to set the mouse-interactivity of an object. (i.e. a la mouseEnabled in Flash)
I’m not sure how to actually implement this on the HTML side. For SVG, the pointer-events attribute could be used.[1]
For regular HTML, we can use CSS if we don’t care about IE10 or lower[2].
Canvas is a whole ‘nother story.
Harbs
[1]https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointer-events#Example
[2]http://caniuse.com/#feat=pointer-events
Re: FlexJS mouseEnabled
Posted by Alex Harui <ah...@adobe.com>.
On 8/15/16, 1:20 PM, "Harbs" <ha...@gmail.com> wrote:
>
>I guess we’ll do an “interactivity” Bead. Any suggestions on a good name?
I would call it DisableBead.
-Alex
Re: FlexJS mouseEnabled
Posted by Harbs <ha...@gmail.com>.
On Aug 15, 2016, at 11:05 PM, Alex Harui <ah...@adobe.com> wrote:
> On 8/15/16, 12:54 PM, "Harbs" <ha...@gmail.com> wrote:
>
>> I can’t find any way in FlexJS to set the mouse-interactivity of an
>> object. (i.e. a la mouseEnabled in Flash)
>
> Is the goal to build something that isn't ever mouse-able or to be able to
> switch its mouse-ability at runtime?
Both.
>
> In my mind, the former might be some base class for non-interactive
> objects. For runtime switching, I imagined that enabled/disabled would be
> a bead and work with the view to do whatever needs to be done. Some
> disabling philosophies is to change the state of the object, others blur
> and/or mask, others don't change the visuals at all.
>
> On the HTML side, I would think that at worse, the "disabling" could
> capture all mouse events and stop their propagation. Other
> implementations would use CSS or whatever.
>
> My 2 cents,
> -Alex
FWIW Here’s some hacks for getting it to work in IIE.[1]
I guess we’ll do an “interactivity” Bead. Any suggestions on a good name?
[1]http://stackoverflow.com/questions/5855135/css-pointer-events-property-alternative-for-ie
Re: FlexJS mouseEnabled
Posted by Alex Harui <ah...@adobe.com>.
On 8/15/16, 12:54 PM, "Harbs" <ha...@gmail.com> wrote:
>I can’t find any way in FlexJS to set the mouse-interactivity of an
>object. (i.e. a la mouseEnabled in Flash)
Is the goal to build something that isn't ever mouse-able or to be able to
switch its mouse-ability at runtime?
In my mind, the former might be some base class for non-interactive
objects. For runtime switching, I imagined that enabled/disabled would be
a bead and work with the view to do whatever needs to be done. Some
disabling philosophies is to change the state of the object, others blur
and/or mask, others don't change the visuals at all.
On the HTML side, I would think that at worse, the "disabling" could
capture all mouse events and stop their propagation. Other
implementations would use CSS or whatever.
My 2 cents,
-Alex