regl-scatterplot icon indicating copy to clipboard operation
regl-scatterplot copied to clipboard

Make lasso work with stylus / touch inputs

Open fspoettel opened this issue 1 year ago • 2 comments

Right now, the lasso mode is implemented via mouse events. This prevents the lasso tool from being compatible with coarser inputs such as stylus or even touch. It would be nice if the lasso tool would support those. Maybe it is enough already to switch to using the genericpointer events, I'm not sure - things like long press would have to be tested.

Use case: annotating plots on a tablet with a stylus.

This is an issue for our company, so I could work on an implementation.

fspoettel avatar Dec 12 '24 15:12 fspoettel

I agree, would be great if lassoing works on all devices. I'm happy to get a PR merged.

flekschas avatar Dec 13 '24 23:12 flekschas

I'm considering adding support for panning/zooming via gesture events on MacOS. Since that could affect this issue, could you clarify your preferred annotation setup @fspoettel ? Which platforms are you on?

Are you envisioning panning around and zooming with two fingers on a trackpad, and then annotating with a separate Wacom stylus next to it? Or do you have a special stylus that supports both multitouch and pen events?

I'm on MacOS and have a wacom stylus but it's only got pen support, not touch. I'm not sure which javascript events it sends but can test if necessary.

(Related: #219 )

gcr avatar Mar 19 '25 16:03 gcr