Skip to content

Commit

Permalink
reverted grid item w and h previous rounding change, fixes #355
Browse files Browse the repository at this point in the history
  • Loading branch information
gmsa committed Sep 11, 2019
1 parent 8dcf63d commit c5b04d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/GridItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@
// width = colWidth * w - (margin * (w - 1))
// ...
// w = (width + margin) / (colWidth + margin)
let w = Math.ceil((width + this.margin[0]) / (colWidth + this.margin[0]));
let h = Math.ceil((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
let w = Math.round((width + this.margin[0]) / (colWidth + this.margin[0]));
let h = Math.round((height + this.margin[1]) / (this.rowHeight + this.margin[1]));
// Capping
w = Math.max(Math.min(w, this.cols - this.innerX), 0);
Expand Down

0 comments on commit c5b04d6

Please sign in to comment.