Scaled pinch to zoom by stage scale
This commit is contained in:
parent
41ffd15a0c
commit
8ca9c39bca
@ -82,7 +82,10 @@ function useStageInteraction(
|
||||
const originXDelta = originX - pinchPreviousOriginRef.current.x;
|
||||
const originYDelta = originY - pinchPreviousOriginRef.current.y;
|
||||
const newScale = Math.min(
|
||||
Math.max(stageScale + distanceDelta * touchZoomSpeed, minZoom),
|
||||
Math.max(
|
||||
stageScale + distanceDelta * touchZoomSpeed * stageScale,
|
||||
minZoom
|
||||
),
|
||||
maxZoom
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user