-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Description: I tried using the official demo to limit the scaling area, but I found that when my mouse moves quickly, directly returning an oldBox makes it impossible to reach the boundary. When we move around the edge, we have to drag the mouse slowly to reach the maximum limit. To address this, I manually modified the returned box to:
{
...oldBox,
width: (MAX_SCALE_SIZE * newBox.width) / newBox.height,
height: MAX_SCALE_SIZE,
}Code: my demo
However, I found that when I drag the top-left, top-right, or bottom-left anchor, if the mouse moves quickly near the limit, the entire shape will move to the right or downward. I think this is because the origin of the image is the top-left corner, but I can't think of any solution. Please help! 🙏
Metadata
Metadata
Assignees
Labels
No labels