diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vue index f1659ed5..335f83a7 100644 --- a/src/components/LinkItems/Section.vue +++ b/src/components/LinkItems/Section.vue @@ -4,7 +4,7 @@ :icon="icon" :uniqueKey="groupId" :collapsed="displayData.collapsed" - :cols="displayData.cols" + :cols="effectiveColsSpan" :rows="displayData.rows" :color="displayData.color" :customStyles="displayData.customStyles" @@ -128,6 +128,7 @@ export default { widgets: Array, index: Number, isWide: Boolean, + activeColCount: String, }, components: { Collapsable, @@ -209,6 +210,9 @@ export default { } return styles; }, + effectiveColsSpan() { + return Math.min(this.activeColCount, this.displayData.cols); + }, }, methods: { /* Opens the iframe modal */ diff --git a/src/views/Home.vue b/src/views/Home.vue index 004b181a..63c304b0 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -19,7 +19,8 @@ -
+
@@ -83,6 +85,7 @@ export default { layout: '', itemSizeBound: '', addNewSectionOpen: false, + activeColCount: '1', }), computed: { singleSectionView() { @@ -172,12 +175,20 @@ export default { availibleThemes.Default = '#'; return availibleThemes; }, + readActiveColCount() { + const { sectionsContainer } = this.$refs; + if (!sectionsContainer) return; + const cs = getComputedStyle(sectionsContainer); + const varVal = cs.getPropertyValue('--col-count').trim(); + this.activeColCount = varVal; + }, }, mounted() { this.initiateFontAwesome(); this.initiateMaterialDesignIcons(); this.layout = this.layoutOrientation; this.itemSizeBound = this.iconSize; + this.readActiveColCount(); }, };