mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	some tuning, cleaning and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									37d89854b8
								
							
						
					
					
						commit
						5e5d4cd5c8
					
				
							
								
								
									
										16
									
								
								ui/files.js
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								ui/files.js
									
									
									
									
									
								
							| @ -482,9 +482,6 @@ function loadRawDir(path, prefix){ | |||||||
| 	res.notify(prefix, 'Loaded', 'Images.') | 	res.notify(prefix, 'Loaded', 'Images.') | ||||||
| 	IMAGES_CREATED = true | 	IMAGES_CREATED = true | ||||||
| 
 | 
 | ||||||
| 	// XXX need to make basic previews (screen-size-ish and ribbon-size-ish)...
 |  | ||||||
| 	// XXX
 |  | ||||||
| 
 |  | ||||||
| 	DATA = dataFromImages(IMAGES) | 	DATA = dataFromImages(IMAGES) | ||||||
| 	res.notify(prefix, 'Loaded', 'Data.') | 	res.notify(prefix, 'Loaded', 'Data.') | ||||||
| 
 | 
 | ||||||
| @ -495,6 +492,10 @@ function loadRawDir(path, prefix){ | |||||||
| 
 | 
 | ||||||
| 	reloadViewer() | 	reloadViewer() | ||||||
| 
 | 
 | ||||||
|  | 	// XXX is this the correct place for this???
 | ||||||
|  | 	updateImagesOrientationQ() | ||||||
|  | 	//makeImagesPreviewsQ()
 | ||||||
|  | 
 | ||||||
| 	return res.resolve() | 	return res.resolve() | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -643,9 +644,18 @@ function updateImageOrientation(gid, no_update_loaded){ | |||||||
| 
 | 
 | ||||||
| 	return getImageOrientation(normalizePath(img.path)) | 	return getImageOrientation(normalizePath(img.path)) | ||||||
| 		.done(function(o){ | 		.done(function(o){ | ||||||
|  | 			var o_o = img.orientation | ||||||
|  | 			var o_f = img.flipped | ||||||
|  | 
 | ||||||
| 			img.orientation = o.orientation | 			img.orientation = o.orientation | ||||||
| 			img.flipped = o.flipped | 			img.flipped = o.flipped | ||||||
| 
 | 
 | ||||||
|  | 			// mark image dirty...
 | ||||||
|  | 			if((o_o != o.orientation || o_f != o.flipped )  | ||||||
|  | 					&& IMAGES_UPDATED.indexOf(gid) < 0){ | ||||||
|  | 				IMAGES_UPDATED.push(gid) | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
| 			// update loaded images...
 | 			// update loaded images...
 | ||||||
| 			if(!no_update_loaded){ | 			if(!no_update_loaded){ | ||||||
| 				var o = getImage(gid) | 				var o = getImage(gid) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user