Re: [5/8] git commit: [flex-asjs] [refs/heads/tlf] - remove buttonDown from JS. It is supposedly unreliable on JS. Folks will have to track mouseDown and mouseUp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [5/8] git commit: [flex-asjs] [refs/heads/tlf] - remove buttonDown from JS. It is supposedly unreliable on JS. Folks will have to track mouseDown and mouseUp

Harbs
I beg to differ.

Yes. The HTML one is always false for mouse move events, but I do think the Flex MouseEvent should have a buttonDown property. (Actually, it should probably have a property for info on which button is pressed.) The state tracking should be passed along with the event.

> On Jun 17, 2017, at 8:08 AM, [hidden email] wrote:
>
> remove buttonDown from JS.  It is supposedly unreliable on JS.  Folks will have to track mouseDown and mouseUp
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1677f0a9
> Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1677f0a9
> Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1677f0a9
>
> Branch: refs/heads/tlf
> Commit: 1677f0a9a6a5474faaba5b2996178866faa69417
> Parents: 3b88454
> Author: Alex Harui <[hidden email]>
> Authored: Fri Jun 16 21:01:25 2017 -0700
> Committer: Alex Harui <[hidden email]>
> Committed: Fri Jun 16 22:08:44 2017 -0700
>
> ----------------------------------------------------------------------
> .../Core/src/main/flex/org/apache/flex/events/MouseEvent.as    | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1677f0a9/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> index 1cea36d..c2fe391 100644
> --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
> @@ -247,7 +247,6 @@ package org.apache.flex.events
> this.ctrlKey = ctrlKey;
> this.altKey = altKey;
> this.shiftKey = shiftKey;
> - this.buttonDown = buttonDown;
> this.delta = delta;
> this.commandKey = commandKey;
> this.controlKey = controlKey;
> @@ -280,7 +279,10 @@ package org.apache.flex.events
> public var ctrlKey:Boolean;
> public var altKey:Boolean;
> public var shiftKey:Boolean;
> - public var buttonDown:Boolean;
> +        // MDL says buttonDown is unreliable in JS for mouseMove so hide
> +        // the API so folks get compile errors and keep their own flags
> +        // for mouseDown/mouseUp
> + private var buttonDown:Boolean;
> public var delta:int;
> public var commandKey:Boolean;
> public var controlKey:Boolean;
>

Loading...