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

Column resize sometimes gives weird behaviour on mouse resize/click #155

Merged
merged 5 commits into from
Oct 4, 2016

Conversation

jtomaszewski
Copy link
Contributor

@jtomaszewski jtomaszewski commented Oct 3, 2016

If you resize column with a mouse click & drag a couple of times, sometimes it jumps to a weird position or doesn't "unclick" at all. More details: https://drive.google.com/file/d/0B5-IASgGnqwdN214NmVrWFkzb3M/view (problems visible from ~0:20).

After a couple of resizing clicks, the sort button stops working as well - you have to click on it multiple times, sometimes the click resizes the column instead of changing sort direction - etc.

Any ideas what exactly can be wrong? ;s

@nthonymiller
Copy link
Contributor

Yep noticed the same thing too.

@amcdnl
Copy link
Contributor

amcdnl commented Sep 28, 2016

Ya, I've seen this before too. I could never narrow it down what exactly was causing it.

Something is going odd in this method I think - https://github.com/swimlane/angular2-data-table/blob/master/src/directives/Draggable.ts#L40

@jtomaszewski
Copy link
Contributor Author

jtomaszewski commented Oct 3, 2016

Fixed in the commits above. Ready to merge.

The problem appeared when event.movementX was equal to 0 and so then variable jumped to (event.screenX - this.prevScreenX) instead, and this.prevScreenX was still an empty value.

@jtomaszewski
Copy link
Contributor Author

jtomaszewski commented Oct 3, 2016

Now it's good to merge.

@amcdnl amcdnl merged commit e7b550a into swimlane:master Oct 4, 2016
@amcdnl
Copy link
Contributor

amcdnl commented Oct 4, 2016

You're awesome! :)

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

Successfully merging this pull request may close these issues.

3 participants