mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	minor refactoring + moved crop context keys to the crop context...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									435918e1b0
								
							
						
					
					
						commit
						6de70e7b98
					
				| @ -64,12 +64,17 @@ module.GLOBAL_KEYBOARD = { | |||||||
| 		Esc: 'toggleSingleImage: "off" -- Exit single image view', | 		Esc: 'toggleSingleImage: "off" -- Exit single image view', | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// XXX cropped -- needs a class to indicate a crop...
 | 	// XXX add "save as collection..."
 | ||||||
| 	'Cropped': { | 	'Cropped': { | ||||||
| 		// XXX make .crop(..) toggle the class...
 |  | ||||||
| 		pattern: '.crop-mode', | 		pattern: '.crop-mode', | ||||||
|  | 
 | ||||||
|  | 		Esc: { | ||||||
|  | 			default: 'uncrop', | ||||||
|  | 			ctrl: 'uncropAll', | ||||||
|  | 		}, | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
|  | 	// XXX add "save as collection..." (???)
 | ||||||
| 	// XXX cleanup...
 | 	// XXX cleanup...
 | ||||||
| 	'Viewer': { | 	'Viewer': { | ||||||
| 		doc: 'NOTE: binding priority is the same as the order of sections '+ | 		doc: 'NOTE: binding priority is the same as the order of sections '+ | ||||||
| @ -203,10 +208,6 @@ module.GLOBAL_KEYBOARD = { | |||||||
| 			ctrl: 'cropMarked', | 			ctrl: 'cropMarked', | ||||||
| 			alt: 'cropBookmarked', | 			alt: 'cropBookmarked', | ||||||
| 		}, | 		}, | ||||||
| 		Esc: { |  | ||||||
| 			default: 'uncrop', |  | ||||||
| 			ctrl: 'uncropAll', |  | ||||||
| 		}, |  | ||||||
| 
 | 
 | ||||||
| 		// marking...
 | 		// marking...
 | ||||||
| 		M: { | 		M: { | ||||||
|  | |||||||
| @ -758,14 +758,12 @@ module.Viewer = core.ImageGridFeatures.Feature({ | |||||||
| 					delete this.__viewer_resize | 					delete this.__viewer_resize | ||||||
| 				} | 				} | ||||||
| 			}], | 			}], | ||||||
|  | 		// manage the .crop-mode css class...
 | ||||||
| 		['crop uncrop', | 		['crop uncrop', | ||||||
| 			function(){ | 			function(){ | ||||||
| 				if(this.cropped){ | 				this.ribbons.viewer[this.cropped ?  | ||||||
| 					this.ribbons.viewer.addClass('crop-mode') | 						'addClass'  | ||||||
| 
 | 					: 'removeClass']('crop-mode') | ||||||
| 				} else { |  | ||||||
| 					this.ribbons.viewer.removeClass('crop-mode') |  | ||||||
| 				} |  | ||||||
| 			}], | 			}], | ||||||
| 	], | 	], | ||||||
| }) | }) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user