Click event support
amanpatel opened this issue · comments
Just like how the component supports "Brush", which allows you to select portion of the chromosomes, we could also support a simple click event handler, which would highlight the region of the chromosome with a red cursor like element. Dragging the chromosome would simply move this cursor where your mouse is.
I might implement this and create a PR.
Hi Aman, interesting -- no objections here to exploring that idea.
Currently, by default, clicking a chromosome toggles single-chromosome view. See e.g. https://eweitz.github.io/ideogram/human. Perhaps the trigger for such toggling could be changed to double-click, to accommodate your proposal where (presumably) single-click would highlight the local area.
Assuming you proceed, I can offer guidance on adding an automated test when a prototype implementation is ready.
I've done it :) After about 3hrs of work. I think I have the first take on this ready to be reviewed. I'll open a PR shortly. Btw, I love the pre-commit Linting & test executions.
This was implemented in #218. Thanks again for that, Aman.