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

Parent padding problem #68

Closed
Nauss opened this issue Jan 12, 2017 · 12 comments
Closed

Parent padding problem #68

Nauss opened this issue Jan 12, 2017 · 12 comments

Comments

@Nauss
Copy link

Nauss commented Jan 12, 2017

Using bounds = 'parent' and setting both padding-left and padding-right on the parent makes the right drag limit wrong (it looks like its padding-left + padding-right).
Reproducing the bug on the demo is easy, just open the dev tools and set the padding (left and right) to 100px.

Setting only the left padding 'works' (in this case, the right padding could not be set and is the same as left...).

The same thing happens on padding-top and padding-bottom.

Maybe I missed something ?

@Nauss Nauss changed the title Parent padding bug Parent padding problem Jan 12, 2017
@Nauss
Copy link
Author

Nauss commented Jan 17, 2017

The bug is actually existing in react-draggable. I added the issue there also.

@bokuweb
Copy link
Owner

bokuweb commented Jan 17, 2017

@Nauss thanks!!
I want to rewrite everything, to not depend on react-draggable on next version.
But there is no time. Pelease wait... 🙇

@Nauss
Copy link
Author

Nauss commented Jan 18, 2017

Why would you like to remove the dependency ? It looks like react-draggable has improved itself a lot since your fork.
Updating the dependency with the latest version seems a better solution to me ?

@bokuweb
Copy link
Owner

bokuweb commented Jan 18, 2017

@Nauss Hmmm...That's exactly right.I'll update forked react-draggable.

@bokuweb
Copy link
Owner

bokuweb commented Apr 22, 2017

react-rnd@5.0.0 published. The latest react-draggable is used in @5.0.0. Is this resolved?

@Nauss
Copy link
Author

Nauss commented Apr 25, 2017

react-draggable issue #218 is fixed but I'm still not sure whether react-rnd has it fixed.
Here are screenshots from the demo (I just added a border and a padding to the parent):
image
image
Top and left padding are handled OK but bottom and right look broken... What do you think ?

@bokuweb
Copy link
Owner

bokuweb commented Apr 25, 2017

@Nauss Thanks for your report. It is a bug.
#97
I'll do investigation.

@bokuweb
Copy link
Owner

bokuweb commented May 1, 2017

@kudlajz Fixed by @5.0.3 🙏

@bokuweb
Copy link
Owner

bokuweb commented Sep 10, 2017

Could you please reopen if you need.

@bokuweb bokuweb closed this as completed Sep 10, 2017
@Matt95
Copy link

Matt95 commented Sep 19, 2017

I am still having this issue, with bounds='parent' and setting the height to a % value via updateSize. The re sizeable takes the height of the root not parent element

@bokuweb
Copy link
Owner

bokuweb commented Sep 19, 2017

@Matt95 Could you please provide reproduced project in webpackbin(https://www.webpackbin.com/bins/-Ku4nRhImIfnt9N08lGu) and open new issue?

@Hartha-kait
Copy link

@bokuweb Thank you for this good lib. I have a problem with paddings here, it is seems the padding no more in consideration !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants