Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make element selection snap distance user-configurable #97

Open
tpitkanen opened this issue Nov 22, 2020 · 1 comment
Open

Make element selection snap distance user-configurable #97

tpitkanen opened this issue Nov 22, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@tpitkanen
Copy link
Member

When making an element selection in ToF-E Histogram view, the selection is finalized by clicking on the first point. There is a minor snap distance to make this easier. (The snap distance is defined in selection.py:128 (self.looseness).)

The needed value for this depends on window size, screen resolution, input device and user. These are highly individual so they should be configurable in the global settings.

@tpitkanen tpitkanen added the enhancement New feature or request label Nov 22, 2020
@jaakkojulin
Copy link
Member

Biggest issue is that the looseness is in units of data (channels), not in pixels on canvas, if I remember correctly. Rectifying this would help a lot.

The polygon selection related code needs to be rewritten:

  • New point should follow the cursor (until key is pressed) and be connected with a line. Except the first point, of course.
  • Going near the first point should "snap" to the last point (and "unsnap" if you move further away). This snap should be set based on resolution etc and be configurable, as mentioned previously, and could also be disabled (snap of 0). Additionally it would be nice if new points can snap to points of other selections so that selections can be made gapless, if necessary. This would have to be disabled by default as excessive snapping gets annoying very quickly.
  • Selections that have been already made can be edited (points moved, added or removed)
  • Selections can be hidden (e.g. by clicking on the legend) and disabled (affects saving of cuts)
  • Selections can be copy/pasted between windows (preferably via clipboard as JSON or alternatively as plain text)
  • 1D ToF histograms of selections can be displayed, preferably without saving the cuts

And as a general rule fixed values (literals) should be avoided. Also useless configuration options should be avoided, but less so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants