@wikala/spmkt 2.29.4 → 2.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -147,6 +147,9 @@ export default {
|
|
|
147
147
|
setArrowsVisibility(collectionIndex) {
|
|
148
148
|
let leftArrow = document.querySelector('.userimg-gallery div.carousel-arrow > span.icon.has-icons-left')
|
|
149
149
|
let rightArrow = document.querySelector('.userimg-gallery div.carousel-arrow > span.icon.has-icons-right')
|
|
150
|
+
if(!leftArrow || !rightArrow) {
|
|
151
|
+
return
|
|
152
|
+
}
|
|
150
153
|
if (collectionIndex === 0) {
|
|
151
154
|
leftArrow.style.visibility = 'hidden'
|
|
152
155
|
} else {
|
|
@@ -159,6 +162,19 @@ export default {
|
|
|
159
162
|
}
|
|
160
163
|
},
|
|
161
164
|
|
|
165
|
+
attachModalToBody() { //fixes z-index issues
|
|
166
|
+
const modal = document.getElementsByClassName('modal');
|
|
167
|
+
let fModal = null;
|
|
168
|
+
if(modal.length) {
|
|
169
|
+
fModal = modal[0];
|
|
170
|
+
}
|
|
171
|
+
const carouselColumns = fModal.querySelector('.carousel-items .columns');
|
|
172
|
+
if(carouselColumns) {
|
|
173
|
+
carouselColumns.style.backgroundColor = '#fff';
|
|
174
|
+
}
|
|
175
|
+
document.body.insertAdjacentElement('afterbegin', fModal)
|
|
176
|
+
},
|
|
177
|
+
|
|
162
178
|
async carouselChange(e) {
|
|
163
179
|
this.collectionIndex = e
|
|
164
180
|
this.reviewImageIndex = 0
|
|
@@ -181,6 +197,7 @@ export default {
|
|
|
181
197
|
this.carouselModal = true
|
|
182
198
|
this.$nextTick(() => {
|
|
183
199
|
this.setArrowsVisibility(collection_idx)
|
|
200
|
+
this.attachModalToBody()
|
|
184
201
|
})
|
|
185
202
|
},
|
|
186
203
|
|