Skip to content

Commit 0ccd36d

Browse files
authored
Merge pull request jbaysolutions#317 from ywmail/master
make sure the size of grid-item is bigger than the slot-item.
2 parents d43e24f + 442cd14 commit 0ccd36d

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
@@ -657,8 +657,8 @@
657657
// width = colWidth * w - (margin * (w - 1))
658658
// ...
659659
// w = (width + margin) / (colWidth + margin)
660-
let w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
661-
let h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
660+
let w = Math.ceil((width + this.margin[0]) / (colWidth + this.margin[0]));
661+
let h = Math.ceil((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
662662
663663
// Capping
664664
w = Math.max(Math.min(w, this.cols - this.innerX), 0);

0 commit comments

Comments
 (0)