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

Col width updated after release mouse button #355

Closed
jousepo opened this issue Sep 9, 2019 · 3 comments
Closed

Col width updated after release mouse button #355

jousepo opened this issue Sep 9, 2019 · 3 comments

Comments

@jousepo
Copy link

jousepo commented Sep 9, 2019

Software version (please complete the following information):

  • Browser chrome 76.0.3809.132
  • Vue Version 2.6.10
  • vue-grid-layout Version: 2.3.5 (working fine in 2.3.4)

Describe the bug
In some cases cols will autoresize to 1 col bigger after resize.

To Reproduce
Steps to reproduce the behavior:

  1. Instance a grid
  2. Add an item and resize it to 6 columns
  3. See error (after release mouse button will be resized to 7)

Expected behavior
While resize action the preview looks ok (6 columns) but when i release button it resizes to 7.

Screenshots
while resizing:
image

After release mouse button:
image

Additional context
Screen resolution 1920*1200

Maybe the problem is for these piece of code where the col its changed to 7 instead of 6:

// Helper for generating column width
calcColWidth: function calcColWidth() {
var colWidth = (this.containerWidth - this.margin[0] * (this.cols + 1)) / this.cols;

@jousepo jousepo changed the title Col width it changes after release mouse button Col width updated after release mouse button Sep 9, 2019
@PennyYip
Copy link

Confirmed having the same issue, reverting to 2.3.4 solved the problem.

@gmsa
Copy link
Contributor

gmsa commented Sep 10, 2019

Have a good idea what caused this, I'll revert it tomorrow and issue a new release

@gmsa gmsa closed this as completed in c5b04d6 Sep 11, 2019
@jousepo
Copy link
Author

jousepo commented Sep 12, 2019

Thx!!!!!

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

No branches or pull requests

3 participants