overscroll icon indicating copy to clipboard operation
overscroll copied to clipboard

A "drag" cannot be identified by the COUNT of mouse moves on different devices

Open SeanDevoy opened this issue 11 years ago • 0 comments

After a lengthy examination of why OverScroll worked at some location and not others, we have detected a design flaw and corrected it. What we found was that depending on driver configuration parameters, the number of "mouse move" events can vary by up to 5 times as many. OverScroll uses the COUNT of mouse move events to determine if a drag has taken place. The result was that on some systems it was almost impossible to achieve a "click" inside the scroll region.

The solution is rather simple. We use the distance traveled to determine is a drag took place. We store the start location on "mouse down" and check the distance from that point in each "mouse move." We set a default value of 8 pixels from the start point to trigger the "dragging" flag. We added that parameter to the "settings" array.

This simple design change removes the device specific problem of excess mouse messages causing everything to be a "drag" and allows "taps" to be "clicks" on any device.

To be more specific about our initial problem, if ELO touch drivers are installed WITH the UPDD Gestures option mouse events are streamlined before release to the system (even when Gestures are not enabled). Without the UPDD Gestures no streamlining occurs and a simple "tap" will often send mousedown, up to 10 mousemoves on the same X,Y point or within 1 pixel, then mouseup. These extra mousemoves are misinterpreted by OverScroll.

Hope that is helpful to others.

Sean Devoy

SeanDevoy avatar Dec 11 '14 19:12 SeanDevoy