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

Moved calculation methods from GridItem to own util file and using it for dropping item. #1127

Closed
wants to merge 2 commits into from

Conversation

jandufek
Copy link

@jandufek jandufek commented Jan 22, 2020

I implemented changes for fixing this issue - #1107

The problem was, that the newly created dropping items were in ReactGridLayout:onDragOver set to coordinates x:0, y:0 which caused the element jumpings.

So I decided to set the correct coordinates right from the beginning. It required the method for calculating the grid coordinates from pixels, which was already done in GridItem:calcXY. So only this method needed to be moved to a separate file, but I thought, that it could be better to keep all calculation methods still together, that is why I moved all of them to new util file.

@STRML
Copy link
Collaborator

STRML commented Jan 22, 2020

Refactoring this actually works well with with #1123. Thanks for the contribution.

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.

2 participants