open-amdocs / webrix

Powerful building blocks for React-based web applications
https://webrix.amdocs.com
Apache License 2.0
431 stars 31 forks source link

Position values returned from `update` method are not exact #41

Closed yairEO closed 3 years ago

yairEO commented 3 years ago

https://codesandbox.io/s/agitated-wind-5j6t9?file=/Example.jsx

https://user-images.githubusercontent.com/845031/118973858-d07e0300-b97a-11eb-9037-da299a5f4c28.mp4

Steps to reproduce:

When simply clicking the movable element (not dragging) - callback is fired with undesired / values.

Expected:

values should be an exact multiply of the setting value (which is set to in this example )

What is happening instead?

Need to investigate why this is happening and not simply round before sending the position values

{left: 199.9999771118164, top: 99.98579406738281}

This might seem insignificant, but is has huge impact on some use-cases

Originally posted by @yairEO in https://github.com/open-amdocs/webrix/issues/37#issuecomment-845028767

ykadosh commented 3 years ago

I was able to reproduce this when zooming in/out.

udia76 commented 3 years ago

:tada: This issue has been resolved in version 1.3.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: