mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
more cleanup and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e4cd77f378
commit
4c71f68de5
@ -367,6 +367,12 @@ body {
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
}
|
}
|
||||||
|
.browse-widget.key-bindings.edit .list>.key.non-action:before {
|
||||||
|
display: inline;
|
||||||
|
content: " (non-action) ";
|
||||||
|
opacity: 0.5;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.browse-widget.key-bindings .list>.new {
|
.browse-widget.key-bindings .list>.new {
|
||||||
|
|||||||
@ -732,10 +732,13 @@ var KeyboardActions = actions.Actions({
|
|||||||
doc
|
doc
|
||||||
: (actions.keyboard.special_handlers[action]
|
: (actions.keyboard.special_handlers[action]
|
||||||
|| null))
|
|| null))
|
||||||
.addClass('key '
|
.addClass('key'
|
||||||
|
// special stuff...
|
||||||
+ (action in actions.keyboard.special_handlers ?
|
+ (action in actions.keyboard.special_handlers ?
|
||||||
'special-action'
|
' special-action'
|
||||||
: ''))
|
: '')
|
||||||
|
// aliases...
|
||||||
|
+ (o.action in actions ? '' : ' non-action'))
|
||||||
c++
|
c++
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -364,39 +364,7 @@ var KeyboardHandlerPrototype = {
|
|||||||
normalizeKey: KeyboardHandlerClassPrototype.normalizeKey,
|
normalizeKey: KeyboardHandlerClassPrototype.normalizeKey,
|
||||||
isKey: KeyboardHandlerClassPrototype.isKey,
|
isKey: KeyboardHandlerClassPrototype.isKey,
|
||||||
|
|
||||||
/*/ XXX not sure if this is needed...
|
|
||||||
normalizeBindings: function(keyboard){
|
|
||||||
keyboard = keyboard || this.keyboard
|
|
||||||
var that = this
|
|
||||||
var service_fields = this.service_fields
|
|
||||||
Object.keys(keyboard).forEach(function(mode){
|
|
||||||
mode = keyboard[mode]
|
|
||||||
|
|
||||||
Object.keys(mode).forEach(function(key){
|
|
||||||
// skip service fields...
|
|
||||||
if(service_fields.indexOf(key) >= 0){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var n = that.normalizeKey(key)
|
|
||||||
|
|
||||||
if(n != key){
|
|
||||||
// duplicate key...
|
|
||||||
if(n in mode){
|
|
||||||
console.warn('duplicate keys: "'+ n +'" and "'+ k +'"')
|
|
||||||
}
|
|
||||||
|
|
||||||
mode[n] = mode[key]
|
|
||||||
delete mode[key]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
return keyboard
|
|
||||||
},
|
|
||||||
//*/
|
|
||||||
|
|
||||||
//isModeApplicable: function(mode, keyboard, context){ return true },
|
//isModeApplicable: function(mode, keyboard, context){ return true },
|
||||||
//isModeApplicable: checkGlobalMode,
|
|
||||||
|
|
||||||
// Get keys for handler...
|
// Get keys for handler...
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user