mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 19:30:07 +00:00 
			
		
		
		
	added single image kyeboard bindings...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									436fd80440
								
							
						
					
					
						commit
						34566ed62b
					
				| @ -25,6 +25,7 @@ module.GLOBAL_KEYBOARD = { | |||||||
| 	'Slideshow': { | 	'Slideshow': { | ||||||
| 		pattern: '.slideshow-running', | 		pattern: '.slideshow-running', | ||||||
| 		ignore: [ | 		ignore: [ | ||||||
|  | 			'Esc', | ||||||
| 			'Up', 'Down', 'Enter', | 			'Up', 'Down', 'Enter', | ||||||
| 			'R', 'L', | 			'R', 'L', | ||||||
| 		], | 		], | ||||||
| @ -41,6 +42,21 @@ module.GLOBAL_KEYBOARD = { | |||||||
| 		L: 'toggleSlideshowLooping', | 		L: 'toggleSlideshowLooping', | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
|  | 	'Single Image': { | ||||||
|  | 		pattern: '.single-image-mode', | ||||||
|  | 		ignore: [ | ||||||
|  | 			'Esc', | ||||||
|  | 
 | ||||||
|  | 			// do not crop in single image mode...
 | ||||||
|  | 			'C', 'F2', | ||||||
|  | 
 | ||||||
|  | 			// XXX not sure about this...
 | ||||||
|  | 			//'Up', 'Down',
 | ||||||
|  | 		], | ||||||
|  | 
 | ||||||
|  | 		Esc: 'toggleSingleImage: "off"', | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
| 	'Global': { | 	'Global': { | ||||||
| 		doc: 'NOTE: binding priority is the same as the order of sections '+ | 		doc: 'NOTE: binding priority is the same as the order of sections '+ | ||||||
| 			'on this page.', | 			'on this page.', | ||||||
| @ -243,8 +259,10 @@ module.GLOBAL_KEYBOARD = { | |||||||
| }	 | }	 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| /*********************************************************************/ | /*********************************************************************/ | ||||||
| 
 | 
 | ||||||
|  | // XXX add introspection and doc actions...
 | ||||||
| var KeyboardActions = actions.Actions({ | var KeyboardActions = actions.Actions({ | ||||||
| 	config: { | 	config: { | ||||||
| 		// limit key repeat to one per N milliseconds.
 | 		// limit key repeat to one per N milliseconds.
 | ||||||
|  | |||||||
| @ -85,6 +85,8 @@ var core = require('features/core') | |||||||
| //
 | //
 | ||||||
| //
 | //
 | ||||||
| // XXX should this be an action???
 | // XXX should this be an action???
 | ||||||
|  | // XXX problems:
 | ||||||
|  | // 		Q: what do we use for scale??
 | ||||||
| function updateImageProportions(){ | function updateImageProportions(){ | ||||||
| 	var viewer = this.ribbons.viewer | 	var viewer = this.ribbons.viewer | ||||||
| 	var image = viewer.find('.image') | 	var image = viewer.find('.image') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user