mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 19:30:07 +00:00 
			
		
		
		
	now loading aliases on start...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									ea39e62329
								
							
						
					
					
						commit
						bc6387af42
					
				| @ -29,9 +29,20 @@ module.Alias = core.ImageGridFeatures.Feature({ | |||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	handlers: [ | 	handlers: [ | ||||||
|  | 		// load aliases...
 | ||||||
|  | 		['start', | ||||||
|  | 			function(){ | ||||||
|  | 				var that = this | ||||||
|  | 				var aliases = this.config.aliases || {} | ||||||
|  | 
 | ||||||
|  | 				Object.keys(aliases) | ||||||
|  | 					.forEach(function(alias){ | ||||||
|  | 						that.alias(alias, aliases[alias]) }) | ||||||
|  | 			}], | ||||||
|  | 		// store aliases in .config.aliases
 | ||||||
|  | 		// XXX should we guard from overriding actions???
 | ||||||
| 		['alias', | 		['alias', | ||||||
| 			function(_, alias, target){ | 			function(_, alias, target){ | ||||||
| 				console.log(alias, target) |  | ||||||
| 				// remove alias...
 | 				// remove alias...
 | ||||||
| 				// XXX is this test enough??? ...see ActionSet.alias(..)
 | 				// XXX is this test enough??? ...see ActionSet.alias(..)
 | ||||||
| 				if(arguments.length == 3  | 				if(arguments.length == 3  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user