mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 11:20:09 +00:00 
			
		
		
		
	some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									16dd6c92a6
								
							
						
					
					
						commit
						4889a1196f
					
				| @ -523,15 +523,6 @@ Images.prototype.constructor = Images | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /*********************************************************************/ |  | ||||||
| 
 |  | ||||||
| // XXX keep this here or move this to a different module???
 |  | ||||||
| module.setupActionHandlers = function(context){ |  | ||||||
| 	// XXX
 |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| /********************************************************************** | /********************************************************************** | ||||||
| * vim:set ts=4 sw=4 :                                                */ | * vim:set ts=4 sw=4 :                                                */ | ||||||
| return module }) | return module }) | ||||||
|  | |||||||
| @ -1602,7 +1602,7 @@ module.RibbonsPrototype = { | |||||||
| 	// NOTE: this will never scale the view in a wat that an image 
 | 	// NOTE: this will never scale the view in a wat that an image 
 | ||||||
| 	// 		overflows either in height nor width.
 | 	// 		overflows either in height nor width.
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// XXX might be usefull to set origin before scaling...
 | 	// XXX might be useful to set origin before scaling...
 | ||||||
| 	fitImage: function(n, min){ | 	fitImage: function(n, min){ | ||||||
| 		n = n || 1 | 		n = n || 1 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -176,6 +176,7 @@ module.GLOBAL_KEYBOARD = { | |||||||
| 
 | 
 | ||||||
| $(function(){ | $(function(){ | ||||||
| 
 | 
 | ||||||
|  | 	// XXX
 | ||||||
| 	window.a = testing.setupActions() | 	window.a = testing.setupActions() | ||||||
| 
 | 
 | ||||||
| 	// setup features...
 | 	// setup features...
 | ||||||
| @ -206,7 +207,6 @@ $(function(){ | |||||||
| 	}) | 	}) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 	// setup base keyboard for devel, in case something breaks...
 | 	// setup base keyboard for devel, in case something breaks...
 | ||||||
| 	$(document) | 	$(document) | ||||||
| 		.keydown( | 		.keydown( | ||||||
|  | |||||||
| @ -1074,23 +1074,34 @@ actions.Actions({ | |||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | // XXX 
 | ||||||
| var SingleImageView = | var SingleImageView = | ||||||
| module.SingleImageView = Feature({ | module.SingleImageView = Feature({ | ||||||
| 	tag: 'ui-single-image-view', | 	tag: 'ui-single-image-view', | ||||||
| 
 | 
 | ||||||
|  | 	// XXX should this be an action???
 | ||||||
| 	// XXX
 | 	// XXX
 | ||||||
|  | 	updateImageProportions: function(actions){ | ||||||
|  | 		// XXX
 | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
| 	setup: function(actions){ | 	setup: function(actions){ | ||||||
|  | 		var that = this | ||||||
| 		return actions | 		return actions | ||||||
| 			.mixin(SingleImageActions) | 			.mixin(SingleImageActions) | ||||||
| 			.on('toggleSingleImage.post fitImgae.post', this.tag, function(){  | 			.on('fitImgae.post', this.tag, function(){  | ||||||
| 				// XXX set image proportions...
 | 				// singe image mode -- set image proportions...
 | ||||||
| 				if(this.toggleSingleImage('?') == 'on'){ | 				if(this.toggleSingleImage('?') == 'on'){ | ||||||
| 					console.log('!!!! single image: on') | 					that.updateImageProportions(this) | ||||||
| 					// XXX
 | 				} | ||||||
|  | 			}) | ||||||
|  | 			.on('toggleSingleImage.post', this.tag, function(){  | ||||||
|  | 				// singe image mode -- set image proportions...
 | ||||||
|  | 				if(this.toggleSingleImage('?') == 'on'){ | ||||||
|  | 					that.updateImageProportions(this) | ||||||
| 
 | 
 | ||||||
| 				// restore original image size...
 | 				// ribbon mode -- restore original image size...
 | ||||||
| 				} else { | 				} else { | ||||||
| 					console.log('!!!! single image: off') |  | ||||||
| 					this.ribbons.viewer.find('.image').css({ | 					this.ribbons.viewer.find('.image').css({ | ||||||
| 						width: '', | 						width: '', | ||||||
| 						height: '' | 						height: '' | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user