mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	fixed bug in keyboard.js...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									dc01b6ea30
								
							
						
					
					
						commit
						4cf1b8e1ce
					
				| @ -162,6 +162,7 @@ var KEYBOARD_CONFIG = { | |||||||
| 
 | 
 | ||||||
| 	// ribbon mode only...
 | 	// ribbon mode only...
 | ||||||
| 	//
 | 	//
 | ||||||
|  | 	// XXX this breaks getKeyHandlers(...) when modes argument is given...
 | ||||||
| 	'.viewer:not(.overlay):not(.single-image-mode)': { | 	'.viewer:not(.overlay):not(.single-image-mode)': { | ||||||
| 		title: 'Ribbon mode', | 		title: 'Ribbon mode', | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -179,6 +179,8 @@ function getKeyHandlers(key, modifiers, keybindings, modes, shifted_keys){ | |||||||
| 
 | 
 | ||||||
| 	for(var mode in keybindings){ | 	for(var mode in keybindings){ | ||||||
| 
 | 
 | ||||||
|  | 		//console.log('>>>', mode)
 | ||||||
|  | 
 | ||||||
| 		// test for mode compatibility...
 | 		// test for mode compatibility...
 | ||||||
| 		// XXX this fails for explicitly given mode...
 | 		// XXX this fails for explicitly given mode...
 | ||||||
| 		if(modes != 'all'  | 		if(modes != 'all'  | ||||||
| @ -255,6 +257,8 @@ function getKeyHandlers(key, modifiers, keybindings, modes, shifted_keys){ | |||||||
| 			continue | 			continue | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | 		//console.log('<<<', mode, did_handling)
 | ||||||
|  | 
 | ||||||
| 		// complex handler...
 | 		// complex handler...
 | ||||||
| 		if(typeof(handler) == typeof({}) && handler.constructor.name == 'Object'){ | 		if(typeof(handler) == typeof({}) && handler.constructor.name == 'Object'){ | ||||||
| 			// build modifier list...
 | 			// build modifier list...
 | ||||||
| @ -289,7 +293,8 @@ function getKeyHandlers(key, modifiers, keybindings, modes, shifted_keys){ | |||||||
| 			continue | 			continue | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		if(did_handling){ | 		if(modes != 'all' && did_handling){ | ||||||
|  | 			//console.log('!!!!', mode)
 | ||||||
| 			break | 			break | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user