tweaks + testing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-11-23 16:14:38 +03:00
parent fada354813
commit 2651ed943f
2 changed files with 27 additions and 2 deletions

View File

@ -182,6 +182,16 @@ module.GLOBAL_KEYBOARD = {
alt: 'browseActions: "/History/" -- Open history menu',
},
V: 'flipVertical',
// tilt...
// XXX experimental, not sure if wee need this with a keyboard...
T: {
default: 'rotateRibbonCCW -- Tilt ribbons counter clock wise',
shift: 'rotateRibbonCW -- Tilt ribbons clock wise',
alt: 'resetRibbonRotation -- Reset ribbon tilt',
},
P: {
'ctrl+shift': 'F12',
},

View File

@ -176,6 +176,8 @@ module.ViewerActions = actions.Actions({
'transparent-ribbon',
],
'ribbon-rotation-step': 10,
// XXX BUG: for some reason this get's shadowed by base.config...
'ribbon-focus-modes': [
'visual', // select image closest visually
@ -867,10 +869,23 @@ module.ViewerActions = actions.Actions({
return this.ribbons.rotate() || 0
}
}],
// Rotate ribbon CW/CCW...
//
// Rotate ribbon (default step)
// .rotateRibbonCW()
//
// Rotate ribbon by step...
// .rotateRibbonCW(5)
//
// NOTE: default step is set by .config['ribbon-rotation-step']
rotateRibbonCW: ['Interface/Rotate ribbon clockwise',
function(a){ this.ribbonRotation('+='+ (a || 10)) }],
function(a){
this.ribbonRotation('+='+ (a || this.config['ribbon-rotation-step'] || 10)) }],
rotateRibbonCCW: ['Interface/Rotate ribbon coounter clockwise',
function(a){ this.ribbonRotation('-='+ (a || 10)) }],
function(a){
this.ribbonRotation('-='+ (a || this.config['ribbon-rotation-step'] || 10)) }],
resetRibbonRotation: ['Interface/Reset ribbon rotation',
function(){ this.ribbonRotation(0) }],