mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									5822fc44a0
								
							
						
					
					
						commit
						a3030d82be
					
				| @ -110,6 +110,8 @@ Roadmap | |||||||
| 
 | 
 | ||||||
| [_] 29% Gen 3 current todo | [_] 29% Gen 3 current todo | ||||||
| 	[_] 58% High priority | 	[_] 58% High priority | ||||||
|  | 		[_] Polish: on LOCAL actions do ALL the loading in background... | ||||||
|  | 		| make the lags completely even... | ||||||
| 		[_] check image caching strategy and thresholds.... | 		[_] check image caching strategy and thresholds.... | ||||||
| 		[_] BUG: OSX: unable to load absolute paths... | 		[_] BUG: OSX: unable to load absolute paths... | ||||||
| 		[_] OSX: add alternatives to function buttons... | 		[_] OSX: add alternatives to function buttons... | ||||||
|  | |||||||
							
								
								
									
										16
									
								
								ui/setup.js
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								ui/setup.js
									
									
									
									
									
								
							| @ -110,21 +110,23 @@ function setupDataBindings(viewer){ | |||||||
| 			var gr = DATA.ribbons[r] | 			var gr = DATA.ribbons[r] | ||||||
| 			var img_before = getImageBefore(image, ribbon) | 			var img_before = getImageBefore(image, ribbon) | ||||||
| 			var gid_before = getGIDBefore(gid, r) | 			var gid_before = getGIDBefore(gid, r) | ||||||
|  | 
 | ||||||
| 			var screen_size = getScreenWidthInImages() | 			var screen_size = getScreenWidthInImages() | ||||||
| 			screen_size = screen_size < 1 ? 1 : screen_size | 			screen_size = screen_size < 1 ? 1 : screen_size | ||||||
| 			var load_frame_size = Math.round(screen_size * LOAD_SCREENS) | 			var load_frame_size = Math.round(screen_size * LOAD_SCREENS) | ||||||
| 			var roll_frame_size = Math.ceil(load_frame_size / 3) |  | ||||||
| 			var threshold = Math.floor(load_frame_size / 4)  |  | ||||||
| 			threshold = threshold < 1 ? 1 : threshold |  | ||||||
| 			var index = gr.indexOf(gid) |  | ||||||
| 			var at_start = index < threshold |  | ||||||
| 			var at_end = (gr.length-1 - index) < threshold |  | ||||||
| 
 | 
 | ||||||
| 			// current image is loaded...
 | 			// current image IS loaded...
 | ||||||
| 			if(gid_before == getImageGID(img_before)){ | 			if(gid_before == getImageGID(img_before)){ | ||||||
| 				var head = img_before.prevAll('.image').length | 				var head = img_before.prevAll('.image').length | ||||||
| 				var tail = img_before.nextAll('.image').length | 				var tail = img_before.nextAll('.image').length | ||||||
| 				var l = ribbon.find('.image').length | 				var l = ribbon.find('.image').length | ||||||
|  | 				var index = gr.indexOf(gid) | ||||||
|  | 				var at_start = index < threshold | ||||||
|  | 				var at_end = (gr.length-1 - index) < threshold | ||||||
|  | 
 | ||||||
|  | 				var roll_frame_size = Math.ceil(load_frame_size / 3) | ||||||
|  | 				var threshold = Math.floor(load_frame_size / 4)  | ||||||
|  | 				threshold = threshold < 1 ? 1 : threshold | ||||||
| 
 | 
 | ||||||
| 				// less images than expected - extend ribbon...
 | 				// less images than expected - extend ribbon...
 | ||||||
| 				if(l < load_frame_size){ | 				if(l < load_frame_size){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user