Skip to content

Commit c5b04d6

Browse files
committed
reverted grid item w and h previous rounding change, fixes #355
1 parent 8dcf63d commit c5b04d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/GridItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@
707707
// width = colWidth * w - (margin * (w - 1))
708708
// ...
709709
// w = (width + margin) / (colWidth + margin)
710-
let w = Math.ceil((width + this.margin[0]) / (colWidth + this.margin[0]));
711-
let h = Math.ceil((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
710+
let w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
711+
let h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
712712
713713
// Capping
714714
w = Math.max(Math.min(w, this.cols - this.innerX), 0);

0 commit comments

Comments
 (0)