mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
use rowGap property with gridRowGap as fallback
This commit is contained in:
parent
f5ef859cc9
commit
626e9e24d4
@ -15,9 +15,10 @@ export default {
|
|||||||
calculateItemHeight() {
|
calculateItemHeight() {
|
||||||
this.$parent.$emit('calculating-item-height')
|
this.$parent.$emit('calculating-item-height')
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const grid = this.$parent
|
const gridStyle = this.$parent.$el.style
|
||||||
const rowHeight = parseInt(grid.$el.style.gridAutoRows)
|
const rowHeight = parseInt(gridStyle.gridAutoRows)
|
||||||
const rowGap = parseInt(grid.$el.style.gridRowGap)
|
const rowGapValue = gridStyle.rowGap || gridStyle.gridRowGap
|
||||||
|
const rowGap = parseInt(rowGapValue)
|
||||||
const itemHeight = this.$el.clientHeight
|
const itemHeight = this.$el.clientHeight
|
||||||
|
|
||||||
this.rowSpan = Math.ceil((itemHeight + rowGap) / (rowHeight + rowGap))
|
this.rowSpan = Math.ceil((itemHeight + rowGap) / (rowHeight + rowGap))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user