Lattice-Automation / seqviz

a JavaScript DNA, RNA, and protein sequence viewer
https://tools.latticeautomation.com/seqviz
MIT License
247 stars 53 forks source link

selecting on circular viewer will scroll linear viewer #208

Closed bugzpodder closed 1 year ago

bugzpodder commented 1 year ago

https://codesandbox.io/p/sandbox/seqviz-chu3r0

When you mousedown on circular viewer to make a selection, the linear viewer will automatically scroll to this position using centralIndex.

I did not add a scroll during mouseMove (dragging selection) because the UI would seem very busy with the scrolling.

The package.json changes are for codesandbox, so you can just do: https://githubbox.com/<user>/seqviz/tree/central_index to get a fully working link

bugzpodder commented 1 year ago

Looks good to me. I think there might be folks that would prefer linear to stay where it was -- when selecting on circular -- but imagine they'll be outnumbered by folks that prefer this change. And adding a bunch of props to configure that is outside the scope of this PR

I see, before I was not sure if its an oversight or intentional. your call, I don't really need this feature :)

One question/nit about the new dev commands. Reason being that start is already pretty much dev (for me at least)

So I think there are two things if we want to merge this into one command: In codesandbox, it will look for and run dev script, and if non-exist it will run start script, so my current approach works. However if we do only keeping one script:

jjti commented 1 year ago

In codesandbox, it will look for and run dev script, and if non-exist it will run start script, so my current approach works.

Gotchu, I wasn't aware that this was how it works. I'm totally game w/ the new commands in that case