Skip to content

Commit

Permalink
fix(zoom): translation with equal pointers position
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Apr 1, 2024
1 parent 849f20e commit 900d054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class Zoom {
const { left, top } = this.element.getBoundingClientRect()
const { cx, cy, distance } = this.getTouches()

if (this.previous !== null) {
if (this.previous !== null && this.previous.distance > 0) {
const delta = distance / this.previous.distance - 1

const ox = (left - cx) * delta
Expand Down

0 comments on commit 900d054

Please sign in to comment.