Improved zoom behavior.
This commit is contained in:
		
							parent
							
								
									51dd0ef4ba
								
							
						
					
					
						commit
						e32ee93e7a
					
				@ -393,7 +393,9 @@ export class AbstractScatter extends Throwable {
 | 
				
			|||||||
            if (delta.distance < this.minInteractionDistance) {
 | 
					            if (delta.distance < this.minInteractionDistance) {
 | 
				
			||||||
                let ratio = delta.distance / this.minInteractionDistance
 | 
					                let ratio = delta.distance / this.minInteractionDistance
 | 
				
			||||||
                rotate *= ratio
 | 
					                rotate *= ratio
 | 
				
			||||||
                //zoom *= ratio
 | 
					                let zoomDelta = zoom - 1
 | 
				
			||||||
 | 
					                zoomDelta *= ratio
 | 
				
			||||||
 | 
					                zoom = 1 + zoomDelta
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            this.transform(delta, zoom, rotate, delta.about)
 | 
					            this.transform(delta, zoom, rotate, delta.about)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user