Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction becomes impossible when height is 0 AND no other interactions have been taken #3

Closed
HopefulLlama opened this issue Jul 17, 2019 · 7 comments
Assignees
Labels
bug Something isn't working solved

Comments

@HopefulLlama
Copy link

On the demo page:

  • Resize the component such that it has 0 height
  • Release the mouse click
  • Try to interact with the component
  • Nothing happens

Additionally, this only happens IF that's all you do. Interacting with it in any other way, such as moving, resizing or rotating, prevents this bug from occurring.

@daybrush
Copy link
Owner

daybrush commented Jul 17, 2019

@HopefulLlama
Thank you for reporting bug.
I have a question to ask you to confirm exactly. Did you interact a diagonally oriented control box when you were resizing? (like nw, ne, sw, se direction)

Maybe that's because the size is 0 and the ratio is gone. I'm currently fixing the problem.

@daybrush daybrush self-assigned this Jul 17, 2019
@daybrush daybrush added the bug Something isn't working label Jul 17, 2019
@HopefulLlama
Copy link
Author

The interaction was done with the north control, and I resized straight down to 0 height, and not exceeding the height to invert it.

@daybrush
Copy link
Owner

@HopefulLlama

Thank you. I know what the problem is. I will reply a comment if I am fixed.

@daybrush
Copy link
Owner

daybrush commented Jul 17, 2019

@HopefulLlama
Hi. moveable@0.3.0 has been published. Check it again.

@HopefulLlama
Copy link
Author

It works, and looks great! I'll close this issue now.

Great work and keep it up.

@luximus-hunter
Copy link

luximus-hunter commented Nov 12, 2019

For me it's still not working, even in newer versions. The x and y scale get set to NaN for some reason when the width of height is 0. If you move fast, nothing happens, but when you move slowly and hit 0 on either of them, one or both jump to NaN and the component resizes itself to the default size. After that you can't scale or rotate the component anymore. Screenshot of the 'tooltip' (or how it's called) says NaN. My cursor was at the red dot.

2019-11-12

@daybrush
Copy link
Owner

@ThomasLipman

Thank you for reporting bug.

react-moveable 0.13.10 is released.
The demo was also updated.
try it again.

https://codesandbox.io/s/react-moveable-demo-jl69c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solved
Projects
None yet
Development

No branches or pull requests

3 participants