From 626e9e24d401dbbaeec94f6ef53e83accdd31b85 Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Tue, 20 Aug 2019 15:46:41 +0100 Subject: [PATCH] use rowGap property with gridRowGap as fallback --- webapp/components/MasonryGrid/MasonryGridItem.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/components/MasonryGrid/MasonryGridItem.vue b/webapp/components/MasonryGrid/MasonryGridItem.vue index 4533a5f11..9ac544b8c 100644 --- a/webapp/components/MasonryGrid/MasonryGridItem.vue +++ b/webapp/components/MasonryGrid/MasonryGridItem.vue @@ -15,9 +15,10 @@ export default { calculateItemHeight() { this.$parent.$emit('calculating-item-height') this.$nextTick(() => { - const grid = this.$parent - const rowHeight = parseInt(grid.$el.style.gridAutoRows) - const rowGap = parseInt(grid.$el.style.gridRowGap) + const gridStyle = this.$parent.$el.style + const rowHeight = parseInt(gridStyle.gridAutoRows) + const rowGapValue = gridStyle.rowGap || gridStyle.gridRowGap + const rowGap = parseInt(rowGapValue) const itemHeight = this.$el.clientHeight this.rowSpan = Math.ceil((itemHeight + rowGap) / (rowHeight + rowGap))