Skip to content

Move element offset problem with grid border: 0 #3356

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

Closed
iorzetic opened this issue Apr 24, 2015 · 4 comments
Closed

Move element offset problem with grid border: 0 #3356

iorzetic opened this issue Apr 24, 2015 · 4 comments

Comments

@iorzetic
Copy link

In the design that we use we do not have a border set for the grid. When trying to move a column, the moveElement that clones the column header gets out of sync with the pointer by 1 px at a time.

Here is a plunkr that reflects that situation: http://plnkr.co/edit/FiabEjA24Hdyy17jNZmp?p=preview
Here is a video for demo purposes (of the same plunkr): http://screencast.com/t/5d7JpqTjPau

I did a bit of investigation regarding this problem and found out that there is a small "correction" the the left position of the move element that happens (which is not specifically commented). I think this correction is the cause of the sync. Could we do something about this in the code? Or if you don't think it is necessary that the code in the grid gets changed for this, please suggest a way in which I can account for that "correction". Having a border with the same color as the general background is not an option because we cannot set the grid element to act as a border-box, in order to account for the border.

Here are the lines of code that I have found (inside the moveElement function):

var currentElmLeft = movingElm[0].getBoundingClientRect().left - 1;
var currentElmRight = movingElm[0].getBoundingClientRect().right;
@iorzetic
Copy link
Author

This is not just a visual drawback. If the amount of space by which the pointer and the move element are out of sync is smaller than the space between the left of the move element and the left a column, the move action will not be calculated correctly and the column position will not be the one intended by the user. (I'm not sure if this is clear as an explanation, let me know if you need it and I will try to create a capture which demonstrates this)

@avinashhota
Copy link

Hi, Please let me know, when the fix for the below mentioned issue, would be release and in which version. Looking for a quick reply. The version I am using is 3.0.7

@stale
Copy link

stale bot commented May 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 23, 2018
@stale
Copy link

stale bot commented Jun 22, 2018

This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.

@stale stale bot closed this as completed Jun 22, 2018
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

3 participants