Improved zoom behavior.

This commit is contained in:
Uwe Oestermeier 2019-07-19 15:30:13 +02:00
parent 51dd0ef4ba
commit e32ee93e7a

View File

@ -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)