more tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-06-01 21:17:38 +04:00
parent 19bec265bc
commit daae8f8bf0
2 changed files with 12 additions and 3 deletions

View File

@ -146,7 +146,7 @@ var KEYBOARD_CONFIG = {
title: 'Global',
doc: 'These key bindings work in most other modes.',
// Aliases...
// Actions...
'.next-screen': doc('Next screen',
function(){
event.preventDefault()
@ -213,7 +213,6 @@ var KEYBOARD_CONFIG = {
shift: 'Right',
// screen-oriented movement...
ctrl: 'Left',
// XXX this does not work...
'ctrl+shift': '.next-screen',
},
Home: doc('First image',

View File

@ -221,8 +221,12 @@ var toggleKeyboardHelp = createCSSClassToggler('.viewer', 'help-mode overlay',
// build the help...
var doc = buildKeybindingsHelpHTML(KEYBOARD_CONFIG)
.on('click', function(){
event.stopImmediatePropagation()
return false
})
.css({
cursor: 'hand',
cursor: 'auto',
})
.appendTo(body)
@ -231,6 +235,9 @@ var toggleKeyboardHelp = createCSSClassToggler('.viewer', 'help-mode overlay',
.one('click', function(){
toggleKeyboardHelp('off')
})
.css({
cursor: 'hand',
})
// scroll to the help...
// NOTE: need to set the scroll handler AFTER we
@ -258,6 +265,9 @@ var toggleKeyboardHelp = createCSSClassToggler('.viewer', 'help-mode overlay',
// animate things if we are not at the top...
if(body.scrollTop() > 0){
body
.css({
cursor: '',
})
.animate({
scrollTop: 0,
}, _cleanup)