From 11178c99aff70632204a593a8f916e7d51f5afaa Mon Sep 17 00:00:00 2001 From: Robert Buels Date: Fri, 2 Nov 2012 11:57:53 -0400 Subject: [PATCH] holding SHIFT while scrolling left and right now makes the view scroll further --- release-notes.txt | 3 +++ src/JBrowse/GenomeView.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/release-notes.txt b/release-notes.txt index 50b18faf58..dfc4f74611 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -21,6 +21,9 @@ zoom in and out. If ALT is added, it zooms further. Thanks to Karsten Hokamp for the excellent suggestion. + * Holding SHIFT while scrolling with the arrow keys causes the view + to scroll further. + * Added a `theme` configuration variable to allow changing the graphical theme to something different from the default "tundra". However, no other themes are implemented yet. diff --git a/src/JBrowse/GenomeView.js b/src/JBrowse/GenomeView.js index 72f1eba167..bcafd2bc8f 100644 --- a/src/JBrowse/GenomeView.js +++ b/src/JBrowse/GenomeView.js @@ -420,7 +420,11 @@ GenomeView.prototype._behaviors = function() { return { var that = this; if( evt.keyCode == dojo.keys.LEFT_ARROW || evt.keyCode == dojo.keys.RIGHT_ARROW ) { + var offset = evt.keyCode == dojo.keys.LEFT_ARROW ? -40 : 40; + if( evt.shiftKey ) + offset *= 5; + this.setX( this.getX() + offset ); if( ! this._keySlideTimeout ) this._keySlideTimeout = window.setTimeout(function() {