Skip to content

Commit

Permalink
fix: 🐛 Fixes onChange hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
prc5 committed Feb 27, 2023
1 parent f004816 commit 0c311f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/instance.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,9 @@ export class ZoomPanPinch {
this.transformState.positionX = positionX;
this.transformState.positionY = positionY;

this.applyTransformation();
const ctx = getContext(this);
this.onChangeCallbacks.forEach((callback) => callback(ctx));

this.applyTransformation();
handleCallback(ctx, { scale, positionX, positionY }, onTransformed);
} else {
console.error("Detected NaN set state values");
Expand Down

0 comments on commit 0c311f1

Please sign in to comment.