Skip to content

Commit

Permalink
Only zoom out if the current zoom is done. Fixes #3878
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Sep 15, 2023
1 parent 0128d1f commit eafc6f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/linear-genome-view/src/LinearGenomeView/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1530,12 +1530,12 @@ export function stateModelFactory(pluginManager: PluginManager) {
// pan right
self.slide(0.9)
}
if (e.code === 'ArrowUp') {
if (e.code === 'ArrowUp' && self.scaleFactor === 1) {
e.preventDefault()
// zoom in
self.zoom(self.bpPerPx / 2)
}
if (e.code === 'ArrowDown') {
if (e.code === 'ArrowDown' && self.scaleFactor === 1) {
e.preventDefault()
// zoom out
self.zoom(self.bpPerPx * 2)
Expand Down

0 comments on commit eafc6f7

Please sign in to comment.