fix: adjust normalization

This commit is contained in:
Konstantinos Kaloutas
2022-09-05 11:24:36 +03:00
parent 8026b08800
commit 4ffc5a69ea

View File

@@ -25,7 +25,8 @@ export class PinchingState<
const { camera } = this.app.viewport
// Normalize the value of deltaZ from raw WheelEvent
const deltaZ = normalizeWheel(event)[2] * 0.05
const deltaZ = normalizeWheel(event)[2] * 0.01
if (deltaZ === 0) return;
const zoom = camera.zoom - deltaZ * camera.zoom;
this.app.viewport.pinchCamera(info.point, [0, 0], zoom)
}