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

allow to deselect via lasso?

Open japrescott opened this issue 2 years ago • 1 comments

Hey @flekschas

Thanks again for this great library. As an idea I was wondering how easy it would be to after selecting different regions with the lasso tool, to then be able to deselect certain subregions also with the lasso mode, eg. when pressing shift+option+ctrl? I am happy to have a poke at this if you think this would be a good addition?

Best

japrescott avatar Feb 20 '23 10:02 japrescott

I think this would be a nice addition. And it shouldn't be too hard to implement this but it'd required adjusting a few different functions:

  1. We need to extend checkModKey() to accept a tuple of action keys
  2. We need to extend the handling of the action key map to allow combinations of multiple keys. Maybe via concatenation with +. E.g., alt+shift.
  3. We need to add a new action key for removing points. E.g., KEY_ACTION_REMOVE
  4. We need to extend the select(), lassoEnd() lasso manager's end() functions to allow remove.

flekschas avatar Feb 21 '23 14:02 flekschas