mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 12:00:11 +00:00 
			
		
		
		
	more digging...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									af8394be69
								
							
						
					
					
						commit
						f677c8369f
					
				| @ -128,11 +128,11 @@ $(document).ready(function(){ | ||||
| 			var x = pos_x | ||||
| 			if(scrolling){ | ||||
| 				var s = getMagazineShift() | ||||
| 				logger.log('>>>' + s) | ||||
| 				shiftMagazineTo(s + (x - _x)) | ||||
| 			} | ||||
| 			_x = x | ||||
| 		}) | ||||
| 		/* | ||||
| 		.on('mousemove', function(evt){ | ||||
| 			//var t = evt.timeStamp || Date.now(); | ||||
| 			evt.preventDefault() | ||||
| @ -142,14 +142,13 @@ $(document).ready(function(){ | ||||
| 				_x = pos_x | ||||
| 			} | ||||
| 			var x = pos_x | ||||
| 			//console.log(pos_x) | ||||
| 			if(scrolling){ | ||||
| 				var s = getMagazineShift() | ||||
| 				logger.log('>>>' + s) | ||||
| 				shiftMagazineTo(s + (x - _x)) | ||||
| 			} | ||||
| 			_x = x | ||||
| 		}) | ||||
| 		*/ | ||||
| 
 | ||||
| 		.on('mouseup touchend', function(){ | ||||
| 			logger.log('[touchend]') | ||||
|  | ||||
| @ -251,6 +251,7 @@ function shiftMagazineTo(offset){ | ||||
| // XXX this is almost the same as getElementScale...
 | ||||
| function getElementShift(elem){ | ||||
| 	elem = $(elem) | ||||
| 	// using transform...
 | ||||
| 	if(USE_TRANSFORM){ | ||||
| 		var vendors = ['o', 'moz', 'ms', 'webkit'] | ||||
| 		var transform = elem.css('transform') | ||||
| @ -269,11 +270,11 @@ function getElementShift(elem){ | ||||
| 		if(!transform || transform == 'none'){ | ||||
| 			return {left: 0, top: 0} | ||||
| 		} | ||||
| 		//return parseFloat(/translate\(([-.0-9]*),/.exec(transform)[1])
 | ||||
| 		return { | ||||
| 			left: parseFloat(/(translate\(|matrix\([^,]*,[^,]*,[^,]*,[^,]*,)([^,]*),/.exec(transform)[2]), | ||||
| 			top: null | ||||
| 		} | ||||
| 	// using left...
 | ||||
| 	} else { | ||||
| 		return { | ||||
| 			left: elem.position().left, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user