mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									c2d9352b0f
								
							
						
					
					
						commit
						0873fa8526
					
				
							
								
								
									
										19
									
								
								ui/data4.js
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								ui/data4.js
									
									
									
									
									
								
							| @ -1,5 +1,6 @@ | |||||||
| /********************************************************************** | /********************************************************************** | ||||||
| *  | *  | ||||||
|  | * Data generation 4 implementation. | ||||||
| * | * | ||||||
| * | * | ||||||
| **********************************************************************/ | **********************************************************************/ | ||||||
| @ -54,7 +55,7 @@ | |||||||
| // 			  		...still thinking of whether making them sparse is
 | // 			  		...still thinking of whether making them sparse is
 | ||||||
| // 			  		worth the work...
 | // 			  		worth the work...
 | ||||||
| // 	3.0	- Gen4 DATA format, introduced several backwards incompatible 
 | // 	3.0	- Gen4 DATA format, introduced several backwards incompatible 
 | ||||||
| // 		cahnges:
 | // 		changes:
 | ||||||
| // 			- added ribbon GIDs, .ribbons now is a gid indexed object
 | // 			- added ribbon GIDs, .ribbons now is a gid indexed object
 | ||||||
| // 			- added .ribbon_order
 | // 			- added .ribbon_order
 | ||||||
| // 			- added base ribbon
 | // 			- added base ribbon
 | ||||||
| @ -66,7 +67,7 @@ | |||||||
| // NOTE: Gen1 and Gen3 refer to code generations rather than data format
 | // NOTE: Gen1 and Gen3 refer to code generations rather than data format
 | ||||||
| // 		iterations, Gen2 is skipped here as it is a different project 
 | // 		iterations, Gen2 is skipped here as it is a different project 
 | ||||||
| // 		(PortableMag) started on the same code base as ImageGrid.Viewer
 | // 		(PortableMag) started on the same code base as ImageGrid.Viewer
 | ||||||
| // 		generation 1 and advanced from there, backporting some of the 
 | // 		generation 1 and advanced from there, back-porting some of the 
 | ||||||
| // 		results eventually formed Gen3...
 | // 		results eventually formed Gen3...
 | ||||||
| //
 | //
 | ||||||
| //
 | //
 | ||||||
| @ -96,6 +97,8 @@ var DataClassPrototype = { | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /*********************************************************************/ | ||||||
|  | 
 | ||||||
| // Data object methods and API...
 | // Data object methods and API...
 | ||||||
| //
 | //
 | ||||||
| // DATA format:
 | // DATA format:
 | ||||||
| @ -182,9 +185,9 @@ var DataPrototype = { | |||||||
| 		return target | 		return target | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// Remove dublicate items from list in-place...
 | 	// Remove duplicate items from list in-place...
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// NOTE: only the first occurance is kept...
 | 	// NOTE: only the first occurrence is kept...
 | ||||||
| 	// NOTE: this is slow-ish...
 | 	// NOTE: this is slow-ish...
 | ||||||
| 	removeDuplicates: function(lst, skip_undefined){ | 	removeDuplicates: function(lst, skip_undefined){ | ||||||
| 		skip_undefined = skip_undefined == null ? true : skip_undefined | 		skip_undefined = skip_undefined == null ? true : skip_undefined | ||||||
| @ -200,7 +203,7 @@ var DataPrototype = { | |||||||
| 		return lst | 		return lst | ||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// Generate a uniqie GID...
 | 	// Generate a unique GID...
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// XXX generate a real gid...
 | 	// XXX generate a real gid...
 | ||||||
| 	newGid: function(prefix){ | 	newGid: function(prefix){ | ||||||
| @ -453,7 +456,7 @@ var DataPrototype = { | |||||||
| 	//
 | 	//
 | ||||||
| 	// If no image is given the current image/ribbon is assumed as target.
 | 	// If no image is given the current image/ribbon is assumed as target.
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// This will allways return count images if there is enough images 
 | 	// This will always return count images if there is enough images 
 | ||||||
| 	// in ribbon from the requested sides of target.
 | 	// in ribbon from the requested sides of target.
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// NOTE: this expects ribbon order and not image order.
 | 	// NOTE: this expects ribbon order and not image order.
 | ||||||
| @ -700,7 +703,7 @@ var DataPrototype = { | |||||||
| 	//	.mergeRibbons(ribbon, ribbon, ...)
 | 	//	.mergeRibbons(ribbon, ribbon, ...)
 | ||||||
| 	//		-> data
 | 	//		-> data
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// If 'all' is the first argumet, this will merge all the ribbons.
 | 	// If 'all' is the first argument, this will merge all the ribbons.
 | ||||||
| 	//
 | 	//
 | ||||||
| 	// This will merge the ribbons into the first.
 | 	// This will merge the ribbons into the first.
 | ||||||
| 	mergeRibbons: function(target, other){ | 	mergeRibbons: function(target, other){ | ||||||
| @ -1165,6 +1168,8 @@ var DataPrototype = { | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /*********************************************************************/ | ||||||
|  | 
 | ||||||
| // Main Data object...
 | // Main Data object...
 | ||||||
| //
 | //
 | ||||||
| function Data(json){ | function Data(json){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user