Open Eng-Elias opened 1 year ago
Hey @Eng-Elias! Sorry for slow reply. This looks dope, and I like the idea of supporting this. I hope we can move it into the viewer though. It's unclear from the repo (there's no CONTRIBUTING guide like we should probably have), but your change was made to the demo application and not the viewer itself.
I think you could make a somewhat similar change to the EventHandler
here: https://github.com/Lattice-Automation/seqviz/blob/ea558f2e2dd74ac19fa7e5dd03215246a2b05695/src/EventHandler.tsx#L21
Maybe with onWheel
in the eventRouter at the bottom? https://github.com/Lattice-Automation/seqviz/blob/ea558f2e2dd74ac19fa7e5dd03215246a2b05695/src/EventHandler.tsx#L253
How to percolate that change is unfortunately tricky. You'll need to:
zoom
from props into state in the constructor: https://github.com/Lattice-Automation/seqviz/blob/ea558f2e2dd74ac19fa7e5dd03215246a2b05695/src/SeqViz.tsx#L217updateZoom
handler on SeqViz
to prop drill down into EventHandler.tsx
zoom
from state rather than props in the SeqViz render: https://github.com/Lattice-Automation/seqviz/blob/ea558f2e2dd74ac19fa7e5dd03215246a2b05695/src/SeqViz.tsx#L420EventHandler
which then percolates that change (depending on the viewer) up into SeqViz
to change its stateHi @jjti , sorry for the delay to respond but I moved to Dubai this month and I was very busy. Thank you for your suggestion, I thought of embedding this feature in the viewer directly but I thought that will not be accepted. However I will try to work on your suggestion in the next few days and push the changes.
Hi @jjti , I embedded mouse wheel zoom into viewer instead of demo, please review the changes and let me know if you have any note.
make changing zoom easier by using (ctrl + mouse wheel)