fix auto-animate bug on devices with < 2 devicePixelRatio
This commit is contained in:
		
							parent
							
								
									48ebc3b7e0
								
							
						
					
					
						commit
						b84888214b
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -343,7 +343,16 @@ export default class AutoAnimate {
 | 
			
		|||
				bounds = elementOptions.measure( element );
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				bounds = element.getBoundingClientRect();
 | 
			
		||||
				bounds = {
 | 
			
		||||
					x: element.offsetLeft * scale,
 | 
			
		||||
					y: element.offsetTop * scale,
 | 
			
		||||
					width: element.offsetWidth * scale,
 | 
			
		||||
					height: element.offsetHeight * scale
 | 
			
		||||
				};
 | 
			
		||||
 | 
			
		||||
				// More precise, but breaks when used in combination
 | 
			
		||||
				// with zoom for scaling the deck ¯\_(ツ)_/¯
 | 
			
		||||
				// bounds = element.getBoundingClientRect();
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			properties.x = bounds.x;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue