mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-11-04 05:10:07 +00:00 
			
		
		
		
	tweaked the export dialog + some minor changes, mostly to debugging...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									5276c54522
								
							
						
					
					
						commit
						140ba153ae
					
				
							
								
								
									
										23
									
								
								ui/data.js
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								ui/data.js
									
									
									
									
									
								
							@ -1418,28 +1418,28 @@ function loadImagesAround(count, gid, ribbon, data){
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	*/
 | 
						*/
 | 
				
			||||||
	// XXX might be magic but now this appears to work!!!
 | 
						// XXX might be magic but now this appears to work!!!
 | 
				
			||||||
	// XXX this still is quite buggy!!
 | 
					 | 
				
			||||||
	// no common sections, do a full reload...
 | 
						// no common sections, do a full reload...
 | 
				
			||||||
	//if(left == null && right == null){
 | 
						//if(left == null && right == null){
 | 
				
			||||||
	if(left == null || right == null){
 | 
						if(left == null || right == null){
 | 
				
			||||||
		console.warn('Ribbon #'+ribbon+', reloading...')
 | 
							console.log('Ribbon #'+ribbon+', reloading...')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		var n = new_ribbon.indexOf(gid)
 | 
							var n = new_ribbon.indexOf(gid)
 | 
				
			||||||
		var o = old_ribbon.indexOf(gid)
 | 
							var o = old_ribbon.indexOf(gid)
 | 
				
			||||||
		o = o < 0 ? n : o
 | 
							o = o < 0 ? n : o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// calculate offsets...
 | 
				
			||||||
		var left = n - o
 | 
							var left = n - o
 | 
				
			||||||
		var right = (new_ribbon.length - old_ribbon.length) - left
 | 
							var right = (new_ribbon.length - old_ribbon.length) - left
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		console.log('>>>', left, right, 
 | 
							console.log('   >>>', left, right, '---',
 | 
				
			||||||
				//'--- images:', ribbon_elem.find('.image').length,
 | 
					 | 
				
			||||||
				'new:', new_ribbon.length,
 | 
					 | 
				
			||||||
				'@', n,
 | 
					 | 
				
			||||||
				'old:', old_ribbon.length,
 | 
									'old:', old_ribbon.length,
 | 
				
			||||||
				'@', o)
 | 
									'@', o,
 | 
				
			||||||
 | 
									'new:', new_ribbon.length,
 | 
				
			||||||
 | 
									'@', n)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		extendRibbon(left, right, ribbon_elem)
 | 
							extendRibbon(left, right, ribbon_elem)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// update the images...
 | 
				
			||||||
		ribbon_elem.find('.image')
 | 
							ribbon_elem.find('.image')
 | 
				
			||||||
			.each(function(i, e){
 | 
								.each(function(i, e){
 | 
				
			||||||
				updateImage(e, new_ribbon[i], size)
 | 
									updateImage(e, new_ribbon[i], size)
 | 
				
			||||||
@ -1447,8 +1447,15 @@ function loadImagesAround(count, gid, ribbon, data){
 | 
				
			|||||||
		var updated = new_ribbon.length
 | 
							var updated = new_ribbon.length
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// partial reload...
 | 
						// partial reload...
 | 
				
			||||||
 | 
						// XXX buggy...
 | 
				
			||||||
 | 
						// 		see: BUG: @ 9 image width, jumping to end of ribbon length 39 messes up loading...
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		console.warn('Ribbon #'+ribbon+', updating...')
 | 
							console.log('Ribbon #'+ribbon+', updating...')
 | 
				
			||||||
 | 
							console.log('   >>>', left, right, '---', 
 | 
				
			||||||
 | 
									'old:', old_ribbon.length,
 | 
				
			||||||
 | 
									'@', old_ribbon.indexOf(gid),
 | 
				
			||||||
 | 
									'new:', new_ribbon.length,
 | 
				
			||||||
 | 
									'@', new_ribbon.indexOf(gid))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		var res = extendRibbon(left, right, ribbon_elem)
 | 
							var res = extendRibbon(left, right, ribbon_elem)
 | 
				
			||||||
		// XXX this will get all the current images, not the resulting ones...
 | 
							// XXX this will get all the current images, not the resulting ones...
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								ui/ui.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								ui/ui.js
									
									
									
									
									
								
							@ -923,7 +923,7 @@ function exportPreviewsDialog(state, dfl){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	var keys = Object.keys(cfg)
 | 
						var keys = Object.keys(cfg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	formDialog(null, '<b>Export:</b> '+ state +'.', cfg, 'OK', 'exportPreviewsDialog')
 | 
						formDialog(null, 'Export: <b>'+ state +'</b>.', cfg, 'OK', 'exportPreviewsDialog')
 | 
				
			||||||
		.done(function(data){
 | 
							.done(function(data){
 | 
				
			||||||
			// get the form data...
 | 
								// get the form data...
 | 
				
			||||||
			var name = data[keys[0]]
 | 
								var name = data[keys[0]]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user