Closed zhbhun closed 1 year ago
@zhbhun Because it is expected that there will be cases where the distance is less than 0.1, the guideline may not be displayed properly. So I set the minimum distance to 1. are you okay?
Get it, perhaps a separate configuration could be provided to distinguish snapThreshold, which is used to control the precision of the display of the guide lines.
@zhbhun
@moveable/helper
0.0.4lit-moveable
0.15.0moveable
0.38.0preact-moveable
0.40.0react-compat-moveable
0.26.0react-moveable
0.41.0svelte-moveable
0.30.0vue-moveable
2.0.0-beta.46vue3-moveable
0.13.0ngx-moveable
0.35.0moveable's new version is released.
snapRenderThreshold
prop is added (default: 1)
Environments
Description
When setting snapThreshold to 0, the drag target's guidelines should only be displayed if it exactly matches the coordinates of the guide element.
https://codesandbox.io/s/funny-glitter-ug3qu6?file=/src/styles.css
BTW: I found moveable force snapThreshold to 1.
https://github.com/daybrush/moveable/blob/d96d5ce7ceb0c3b74824703ee7000d530db4d2df/packages/react-moveable/src/react-moveable/ables/Snappable.tsx#L664
https://github.com/daybrush/moveable/blob/d96d5ce7ceb0c3b74824703ee7000d530db4d2df/packages/react-moveable/src/react-moveable/ables/snappable/snap.ts#L145-L148