linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

Lasso Select #74

Open JobLeonard opened 7 years ago

JobLeonard commented 7 years ago

We want to be able to select a subset of cells/genes from a scatterplot by drawing a polygon around them, and then do something with that selection.

Interface-wise, drawing and selecting similar to this d3 sketch would be nice:

http://bl.ocks.org/christophermanning/5020993

Things that need to be fixed before this can work

So yeah, quite the architectural design challenge, I think. If it's ok with you I'll take this slow and think hard about it to "try and get it right the first time", as one of the CompSci professors at my old Uni would always say (which is part of why I want to focus on other, more straightforward issues first: I'll get to work on this in the back of my head for a while).

JobLeonard commented 7 years ago

Mouse coordinates on canvas: HTML5 Canvas Mouse Coordinates

Idea for how to handle mouse input:

JobLeonard commented 7 years ago

react-keydown - might be useful for assigning hotkeys to a canvas that has focus - for example, using + and - to zoom to/ from mouse position on scatterplots.