On Mon, 11 Dec 2023 19:04:49 GMT, Jose Pereda <jper...@openjdk.org> wrote:

>> it is sort of equivalent in this case...
>> I think this code is correct.
>
> It is the same as using `dragDelta != 0`, since `dragDelta = 0` implies 
> `dragDirection = 0`.
> 
> The if-else expression doesn't provide a value for the case `dragDelta == 0`, 
> so I've added an initial value 0 to `dragDirection`. 
> 
> Since `prevDragDirection` initial value is -1, we need to verify that 
> `dragDirection` is not zero and also  `prevDragDirection` is different to 
> `dragDirection` to detect a change of direction.

Right. Thanks for the clarification.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1304#discussion_r1423055173

Reply via email to