Skip to content

Wrong size when resizing diagonally with lockAspectRatio #222

Open
@catherine-dubovik

Description

@catherine-dubovik

Thanks for opening an issue!

Please select the type of issue you're reporting. For questions.

  • Bug
  • Feature Request
  • Question

Problem Report

If lockAspectRatio option is set to true and you resize ResizableBox/Resizable diagonally, the size is wrong, the content is resized way faster than the mouse cursor moves. The issue is cumulative and is more noticeable while resizing a large ResizableBox/Resizable to a smaller one or vice versa.
It can be reproduced on version 3.0.0 and higher (see attached video resizable-3.0.4), but on version 2.0.0 and lower everything is ok (see attached video resizable-2.0.0) .

System Info

Node Version: v16.16.0
Browser: Google Chrome 113.0.5672.127
OS: Windows 10

Reproduction

https://codesandbox.io/s/long-https-uoun8f?file=/src/ResizableBox.js

resizable-3.0.4.mp4
resizable-2.0.0.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions