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

* Added movementRatio prop, this will allow the box to stick to the… #391

Merged
merged 3 commits into from
Dec 14, 2018

Conversation

martinmcneela
Copy link

@martinmcneela martinmcneela commented Dec 7, 2018

This PR doesn't have an existing issue (that I could see).

The problem:
When using flexbox the user would see a detachment in the box and the cursor that is resizing it.

The solution:
I have added movementRatio prop that is not required and defaults to '1' so it won't effect existing functionality.
When using flexbox layout (or anytime you want) you can set the prop to '2' to allow the handle being dragged to stick to the cursor.

Testing:
I have tested with and without this props and everything is working as expected. I have also added two now stories to illustrate the issue it is solving.

Notes:
This is my first ever PR to an open source repo, so I am happy to take any feedback and make the required changes.

@martinmcneela
Copy link
Author

This build failed, it seas 'movementRatio' is undefined even though the default prop is set to 1. Any ideas?

@bokuweb
Copy link
Owner

bokuweb commented Dec 8, 2018

@martinmcneela Thanks for your work. Please try default value like follwing.

const  movementRatio = this.props. movementRatio || 1;

@martinmcneela
Copy link
Author

Great I'll give that a go first chance I get.

@martinmcneela
Copy link
Author

@bokuweb that fixed it thanks.

src/index.js Outdated Show resolved Hide resolved
* Updated README to include new prop.
@martinmcneela
Copy link
Author

Change request made and updated.

@bokuweb
Copy link
Owner

bokuweb commented Dec 14, 2018

@martinmcneela Sorry for late. LGTM

@bokuweb bokuweb merged commit 74dcf2f into bokuweb:master Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants