mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									b65d82bc7d
								
							
						
					
					
						commit
						57e1dca1b5
					
				| @ -55,8 +55,9 @@ function centerSquare(zoom){ | |||||||
| 	// relative position to container...  | 	// relative position to container...  | ||||||
| 	// XXX is there a better way to get this? | 	// XXX is there a better way to get this? | ||||||
| 	var t = rn * (h - mh/2) | 	var t = rn * (h - mh/2) | ||||||
| 	//$('.container').css({'margin-top': (-t + H/zoom/2 + h/2)}) | 	$('.container').css({ | ||||||
| 	$('.container').css({'margin-top': (-t + H/2 + h/2)}) | 		'margin-top': (-t + H/2 + h/2) | ||||||
|  | 	}) | ||||||
| 
 | 
 | ||||||
| 	// horizontal... | 	// horizontal... | ||||||
| 	alignRibbon() | 	alignRibbon() | ||||||
| @ -90,15 +91,12 @@ function alignRibbon(square, position, zoom){ | |||||||
| 
 | 
 | ||||||
| 	switch(position){ | 	switch(position){ | ||||||
| 		case 'before': | 		case 'before': | ||||||
| 			//ribbon.css({'margin-left': (-l + W/zoom/2 + w)}) |  | ||||||
| 			ribbon.css({'margin-left': (-l + W/2 + w)}) | 			ribbon.css({'margin-left': (-l + W/2 + w)}) | ||||||
| 			return true | 			return true | ||||||
| 		case 'center': | 		case 'center': | ||||||
| 			//ribbon.css({'margin-left': (-l + W/zoom/2 + w/2)}) |  | ||||||
| 			ribbon.css({'margin-left': (-l + W/2 + w/2)}) | 			ribbon.css({'margin-left': (-l + W/2 + w/2)}) | ||||||
| 			return true | 			return true | ||||||
| 		case 'after': | 		case 'after': | ||||||
| 			//ribbon.css({'margin-left': (-l + W/zoom/2)}) |  | ||||||
| 			ribbon.css({'margin-left': (-l + W/2)}) | 			ribbon.css({'margin-left': (-l + W/2)}) | ||||||
| 			return true | 			return true | ||||||
| 	} | 	} | ||||||
| @ -106,6 +104,7 @@ function alignRibbon(square, position, zoom){ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // XXX need to fix animation jumping around...  | // XXX need to fix animation jumping around...  | ||||||
|  | // XXX try transition-origin instead of compensating by moving... | ||||||
| function zoom(factor){ | function zoom(factor){ | ||||||
| 	var zoom = $('.container').css('zoom')*factor  | 	var zoom = $('.container').css('zoom')*factor  | ||||||
| 	var H = $('.meta-container').height() | 	var H = $('.meta-container').height() | ||||||
| @ -199,8 +198,8 @@ function zoom(factor){ | |||||||
| 
 | 
 | ||||||
| </style> | </style> | ||||||
| 
 | 
 | ||||||
| <button onclick="zoom(1.1)">+</button> | <button onclick="zoom(2)">+</button> | ||||||
| <button onclick="zoom(0.9)">-</button> | <button onclick="zoom(0.5)">-</button> | ||||||
| 
 | 
 | ||||||
| <br> | <br> | ||||||
| <br> | <br> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user