mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 19:30:07 +00:00 
			
		
		
		
	more refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									7b0a68b99f
								
							
						
					
					
						commit
						a02b835127
					
				| @ -428,7 +428,7 @@ function setupDataBindings(){ | |||||||
| 			} | 			} | ||||||
| 		}) | 		}) | ||||||
| 		/* | 		/* | ||||||
| 		// XXX BUGGY...
 | 		// XXX BUGGY -- pissibly due to rollRibbon align issues...
 | ||||||
| 		.on('centeringRibbon', function(evt, ribbon, image){ | 		.on('centeringRibbon', function(evt, ribbon, image){ | ||||||
| 			// check if we are in the right range...
 | 			// check if we are in the right range...
 | ||||||
| 			var gid = getImageGID(image) | 			var gid = getImageGID(image) | ||||||
|  | |||||||
| @ -131,12 +131,11 @@ function getImageBefore(image, ribbon, mode){ | |||||||
| 		ribbon = getRibbon(image) | 		ribbon = getRibbon(image) | ||||||
| 	} | 	} | ||||||
| 	var images = $(ribbon).find('.image').filter(mode) | 	var images = $(ribbon).find('.image').filter(mode) | ||||||
| 	// XXX need to process/format this correctly...
 | 	var order = getImageOrder(image) | ||||||
| 	var order = JSON.parse(image.attr('order')) |  | ||||||
| 	var prev = [] | 	var prev = [] | ||||||
| 
 | 
 | ||||||
| 	images.each(function(){ | 	images.each(function(){ | ||||||
| 		if(order < JSON.parse($(this).attr('order'))){ | 		if(order < getImageOrder($(this))){ | ||||||
| 			return false | 			return false | ||||||
| 		} | 		} | ||||||
| 		prev = this | 		prev = this | ||||||
| @ -295,6 +294,9 @@ function removeRibbon(ribbon){ | |||||||
| 
 | 
 | ||||||
| // NOTE: negative left or right will contract the ribbon...
 | // NOTE: negative left or right will contract the ribbon...
 | ||||||
| // XXX check what goes on if left/right are far more than length...
 | // XXX check what goes on if left/right are far more than length...
 | ||||||
|  | // XXX compensating for added/removed images at the start of the ribbon 
 | ||||||
|  | // 		does not work the same in every situation...
 | ||||||
|  | // 		...for some reason it is correct ONLY for left == -right
 | ||||||
| function extendRibbon(left, right, ribbon){ | function extendRibbon(left, right, ribbon){ | ||||||
| 	ribbon = ribbon == null ?  | 	ribbon = ribbon == null ?  | ||||||
| 				getRibbon() | 				getRibbon() | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user