Skip to content

Col width updated after release mouse button #355

@jousepo

Description

@jousepo

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions