From 84953a947e2d683e0341b5d9d0c038b2f0503ec8 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 21 Oct 2014 21:17:44 +0400 Subject: [PATCH] minor tweaking... Signed-off-by: Alex A. Naanou --- ui (gen4)/ui.js | 12 ++++++++++-- ui (gen4)/viewer.js | 11 ++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 36c2f5ab..693735a0 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -101,13 +101,21 @@ module.GLOBAL_KEYBOARD = { }, // XXX testing... - Home: 'firstImage', - End: 'lastImage', + Home: { + default: 'firstImage', + ctrl: 'firstRibbon', + }, + End: { + default: 'lastImage', + ctrl: 'lastRibbon', + }, Left: { default: 'prevImage', alt: 'shiftImageLeft!', ctrl: 'prevScreen', }, + PgUp: 'prevScreen', + PgDown: 'nextScreen', Right: { default: 'nextImage', alt: 'shiftImageRight!', diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index a85a3adf..cfc10019 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -218,12 +218,10 @@ actions.Actions({ function(){ this.nextImage(this.data.order) }], firstRibbon: ['Focus previous ribbon', - function(){ this.focusRibbon('fisrt') }], + function(){ this.focusRibbon('first') }], lastRibbon: ['Focus next ribbon', function(){ this.focusRibbon('last') }], - // XXX check that going up/down must be stable and not drift to - // adjacent images... prevRibbon: ['Focus previous ribbon', function(){ this.focusRibbon('before') }], nextRibbon: ['Focus next ribbon', @@ -746,6 +744,12 @@ module.BoundsIndicators = { .on('prevImage.pre', tag, didAdvance('start')) .on('nextRibbon.pre', tag, didAdvance('bottom')) .on('prevRibbon.pre', tag, didAdvance('top')) + // XXX not sure about these... + .on('lastImage.pre', tag, didAdvance('end')) + .on('firstImage.pre', tag, didAdvance('start')) + .on('firstRibbon.pre', tag, didAdvance('top')) + .on('lastRibbon.pre', tag, didAdvance('bottom')) + // vertical shifting... .on('shiftImageUp.post', tag, function(){ @@ -755,6 +759,7 @@ module.BoundsIndicators = { function(){ that.flashIndicator(actions.ribbons.viewer, 'down') }) + // horizontal shifting... .on('shiftImageLeft.pre', tag, function(target){