fixed home showroomcarroussel bug
This commit is contained in:
parent
044346c016
commit
6722964893
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -50,10 +50,11 @@ export default {
|
|||
initShowroomCarroussel(){
|
||||
console.log('startShowroomCarroussel')
|
||||
this.showrooms = document.querySelectorAll('.field--name-computed-showrooms-reference > .field__item')
|
||||
console.log('showrooms', this.showrooms)
|
||||
if (!this.showrooms.lenght) {
|
||||
console.log('showrooms', this.showrooms.length, this.showrooms)
|
||||
if (!this.showrooms.length) {
|
||||
return
|
||||
}
|
||||
// console.log('TEST')
|
||||
for (let i = 0; i < this.showrooms.length; i++) {
|
||||
if (i%2 === 0) {
|
||||
this.showroomsOdd.push(this.showrooms[i])
|
||||
|
@ -78,6 +79,7 @@ export default {
|
|||
// this.switchShowroomCarroussel()
|
||||
},
|
||||
checkShowroomMode(mq){
|
||||
console.log('checkShowroomMode', mq)
|
||||
// default mode 1
|
||||
let newmode = 1
|
||||
if (mq.matches) {
|
||||
|
@ -107,7 +109,7 @@ export default {
|
|||
this.switchShowroomCarroussel()
|
||||
},
|
||||
switchShowroomCarroussel(){
|
||||
// console.log('switchShowroomCarroussel i', $elmts, i)
|
||||
console.log('switchShowroomCarroussel')
|
||||
if (this.showroomMode === 1) {
|
||||
this.showrooms[this.showroomI].classList.add('active')
|
||||
this.showrooms[this.showroomI-1 < 0 ? this.showrooms.length -1 : this.showroomI-1].classList.remove('active')
|
||||
|
|
Loading…
Reference in New Issue