mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-29 18:30:09 +00:00 
			
		
		
		
	minor bug fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									f61926171a
								
							
						
					
					
						commit
						286d19237d
					
				| @ -110,10 +110,16 @@ var SingleImageActions = actions.Actions({ | |||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			var viewer = this.ribbons.viewer | 			var viewer = this.ribbons.viewer | ||||||
| 			var img = this.ribbons.getImage() | 			var images = viewer.find('.ribbon .image') | ||||||
|  | 			var img = this.ribbons.getImage()[0] || images[0] | ||||||
|  | 
 | ||||||
|  | 			// no images loaded...
 | ||||||
|  | 			if(!img){ | ||||||
|  | 				return | ||||||
|  | 			} | ||||||
| 
 | 
 | ||||||
| 			//* XXX these do not account for margins....
 | 			//* XXX these do not account for margins....
 | ||||||
| 			var s = getComputedStyle(img[0]) | 			var s = getComputedStyle(img) | ||||||
| 			var w = parseFloat(s.width) | 			var w = parseFloat(s.width) | ||||||
| 			var h = parseFloat(s.height) | 			var h = parseFloat(s.height) | ||||||
| 
 | 
 | ||||||
| @ -127,8 +133,6 @@ var SingleImageActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 			// change proportions...
 | 			// change proportions...
 | ||||||
| 			if(c < threshold){ | 			if(c < threshold){ | ||||||
| 				var images = viewer.find('.ribbon .image') |  | ||||||
| 
 |  | ||||||
| 				var W = viewer.width() | 				var W = viewer.width() | ||||||
| 				var H = viewer.height() | 				var H = viewer.height() | ||||||
| 
 | 
 | ||||||
| @ -198,8 +202,6 @@ var SingleImageActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 			// reset proportions to square...
 | 			// reset proportions to square...
 | ||||||
| 			} else if(w != h) { | 			} else if(w != h) { | ||||||
| 				var images = viewer.find('.ribbon .image') |  | ||||||
| 
 |  | ||||||
| 				getAnimationFrame(function(){ | 				getAnimationFrame(function(){ | ||||||
| 					that.ribbons.preventTransitions() | 					that.ribbons.preventTransitions() | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user