Browse Source

Improved zoom behavior.

obersalzberg
Uwe Oestermeier 1 year ago
parent
commit
e32ee93e7a
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/scatter.js

+ 3
- 1
lib/scatter.js View File

@ -393,7 +393,9 @@ export class AbstractScatter extends Throwable {
if (delta.distance < this.minInteractionDistance) {
let ratio = delta.distance / this.minInteractionDistance
rotate *= ratio
//zoom *= ratio
let zoomDelta = zoom - 1
zoomDelta *= ratio
zoom = 1 + zoomDelta
}
this.transform(delta, zoom, rotate, delta.about)

Loading…
Cancel
Save