mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									c2d3126ade
								
							
						
					
					
						commit
						8f4480a12e
					
				| @ -228,8 +228,9 @@ $(function(){ | |||||||
| 	setup() | 	setup() | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| if(ISCROLL){ |  | ||||||
| // setup iScroll... | // setup iScroll... | ||||||
|  | if(ISCROLL){ | ||||||
|  | 	// Vertical scroll and zoom... | ||||||
| 	$('.scaler') | 	$('.scaler') | ||||||
| 		.css({ | 		.css({ | ||||||
| 			overflow: 'hidden', | 			overflow: 'hidden', | ||||||
| @ -247,8 +248,11 @@ if(ISCROLL){ | |||||||
| 		zoom: true, | 		zoom: true, | ||||||
| 	}) | 	}) | ||||||
| 
 | 
 | ||||||
| 	scroll_view | 	var t | ||||||
| 		.on('zoomEnd', function(){ | 	$('.scaler').on('touchend mouseup', function(){ | ||||||
|  | 		t = $('.ribbon-set')[0].style.transform | ||||||
|  | 	}) | ||||||
|  | 	scroll_view.on('zoomEnd', function(){ | ||||||
| 		var v = $('.viewer') | 		var v = $('.viewer') | ||||||
| 
 | 
 | ||||||
| 		var s = scroll_view.scale | 		var s = scroll_view.scale | ||||||
| @ -257,11 +261,28 @@ if(ISCROLL){ | |||||||
| 
 | 
 | ||||||
| 		var e = $('.ribbon-set')[0] | 		var e = $('.ribbon-set')[0] | ||||||
| 
 | 
 | ||||||
| 			// XXX not yet correct... | 		// XXX compensate for offset -- scroll ribbons by to  | ||||||
|  | 		//	place them where they where under user's fingers... | ||||||
|  | 		console.log('>>>>', t) | ||||||
|  | 		scroll_ribbon.forEach(function(r){ | ||||||
|  | 			// XXX ~(W/s - translateX) | ||||||
|  | 		}) | ||||||
|  | 
 | ||||||
| 		e.style.width = (W / s) + 'px' | 		e.style.width = (W / s) + 'px' | ||||||
| 		e.style.height = (H / s) + 'px' | 		e.style.height = (H / s) + 'px' | ||||||
| 	}) | 	}) | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	// Ribbon scroll... | ||||||
|  | 	// | ||||||
|  | 	// Problems: | ||||||
|  | 	//	- iScroll does not account for margins when aclculating  | ||||||
|  | 	//	  scroll width, need to patch this on .update(..)... | ||||||
|  | 	//	- can't scroll ribbons independently | ||||||
|  | 	//		- two fingers will trigger zoom | ||||||
|  | 	//		- for some reason if touching two ribbons while | ||||||
|  | 	//		  zooming they will move in the same direction... | ||||||
| 	window.scroll_ribbon = [] | 	window.scroll_ribbon = [] | ||||||
| 	$('.ribbon-container')//.eq(0) | 	$('.ribbon-container')//.eq(0) | ||||||
| 		.css({ | 		.css({ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user