FIX: #454
Component change the Y position when Drag stops even though dragging is restricted to X axis
@chathuraa Thanks for your great work :) Looks good. I'd like to ask you one more favor, could you please add reproduced case to storybook.
https://codesandbox.io/s/j1vj3j90ov
Sure thing, I'll give it a go, this will be my 1st story book. :).
On Thu, 4 Oct. 2018, 9:54 am bokuweb, [email protected] wrote:
@chathuraa https://github.com/chathuraa Thanks for your great work :) Looks good. I'd like to ask you one more favor, could you please add reproduced case to storybook.
https://codesandbox.io/s/j1vj3j90ov
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bokuweb/react-rnd/pull/455#issuecomment-426841009, or mute the thread https://github.com/notifications/unsubscribe-auth/ACTfwd6xhn2mJzDjFtnyR-VMKK2VxYltks5uhU5GgaJpZM4XF0gA .
Yep will do.
On Thu, 4 Oct. 2018, 3:43 pm bokuweb, [email protected] wrote:
@bokuweb requested changes on this pull request.
In src/index.tsx https://github.com/bokuweb/react-rnd/pull/455#discussion_r222543143:
@@ -497,10 +497,32 @@ export class Rnd extends React.Component<Props, State> { const { left, top } = this.getOffsetFromParent(); let draggablePosition; if (position) {
@chathuraa https://github.com/chathuraa Sorry, could you please separate these block to another function or method like createNewPosition 🙏
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bokuweb/react-rnd/pull/455#pullrequestreview-161453604, or mute the thread https://github.com/notifications/unsubscribe-auth/ACTfwSK9NAHsBlHFRs_roGAcB9K0Cd84ks5uhZ_5gaJpZM4XF0gA .
It seems to be. Cause of the issue is adding/subtracting left and top. And getoffset.... is dependency for most of the other methods.
Adding and subtracting should be based on each scenario, I can't figure out the relationship between the uncontrolled bounds and getoffset....
Thanks
On Mon, 8 Oct. 2018, 11:09 am bokuweb, [email protected] wrote:
@bokuweb commented on this pull request.
In src/index.tsx https://github.com/bokuweb/react-rnd/pull/455#discussion_r223233910:
@@ -497,10 +497,32 @@ export class Rnd extends React.Component<Props, State> { const { left, top } = this.getOffsetFromParent(); let draggablePosition; if (position) {
Hmmmm, I'll try to fix it 🙏 So, this issue is complex....
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bokuweb/react-rnd/pull/455#discussion_r223233910, or mute the thread https://github.com/notifications/unsubscribe-auth/ACTfwbUufhjvx6YVne2CRuVvEkF_Tzmcks5uipedgaJpZM4XF0gA .
Any chance to get this PR mergered? Experiencing same issues
For enyone facing same issue, there is workaround.
Just set vertical grid strep to some ridiculous value like dragGrid={[stepWidth, 10000]}
note: when I did set grid vertical value to 0 while using controlled state. Drag start behave really wierdly.
Hello?