flekschas / regl-scatterplot

Scalable WebGL-based scatter plot library build with Regl
https://flekschas.github.io/regl-scatterplot/
MIT License
188 stars 23 forks source link

Left clicking multiple times leads to unresponsive plot #188

Closed rpadmanabhan closed 1 month ago

rpadmanabhan commented 1 month ago

I noticed that if I click multiple times in a spot without any point it can lead to an unresponsive plot (i.e. zooming and panning has no effect). This happens when lassoInitiator is enabled. I can get control of the plot back if I shift and select some points. Is this something that could be fixed in the library ?

E.g. on the demo site : left_clicking_like_crazy_bug

Best, Raghav

flekschas commented 1 month ago

I believe what you experience is expected as clicking in an empty area triggers the lasso initiator when lassoInitiator is set to true. You cannot pan or zoom until either the lasso initiator disappeared or you leave it by mousing outside.

The simplest solution to this is to not use the lasso initiator and instead activate lassoOnLongPress

Here's how the lasso on long press works:

lassso-on-long-press

I noticed that the README doesn't mention the lassoOnLongPress at all and will update it shortly.

rpadmanabhan commented 1 month ago

That makes sense, thank you for that explanation.