|
@@ -50,10 +50,11 @@ export default {
|
|
initShowroomCarroussel(){
|
|
initShowroomCarroussel(){
|
|
console.log('startShowroomCarroussel')
|
|
console.log('startShowroomCarroussel')
|
|
this.showrooms = document.querySelectorAll('.field--name-computed-showrooms-reference > .field__item')
|
|
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
|
|
return
|
|
}
|
|
}
|
|
|
|
+ // console.log('TEST')
|
|
for (let i = 0; i < this.showrooms.length; i++) {
|
|
for (let i = 0; i < this.showrooms.length; i++) {
|
|
if (i%2 === 0) {
|
|
if (i%2 === 0) {
|
|
this.showroomsOdd.push(this.showrooms[i])
|
|
this.showroomsOdd.push(this.showrooms[i])
|
|
@@ -78,6 +79,7 @@ export default {
|
|
// this.switchShowroomCarroussel()
|
|
// this.switchShowroomCarroussel()
|
|
},
|
|
},
|
|
checkShowroomMode(mq){
|
|
checkShowroomMode(mq){
|
|
|
|
+ console.log('checkShowroomMode', mq)
|
|
// default mode 1
|
|
// default mode 1
|
|
let newmode = 1
|
|
let newmode = 1
|
|
if (mq.matches) {
|
|
if (mq.matches) {
|
|
@@ -107,7 +109,7 @@ export default {
|
|
this.switchShowroomCarroussel()
|
|
this.switchShowroomCarroussel()
|
|
},
|
|
},
|
|
switchShowroomCarroussel(){
|
|
switchShowroomCarroussel(){
|
|
- // console.log('switchShowroomCarroussel i', $elmts, i)
|
|
|
|
|
|
+ console.log('switchShowroomCarroussel')
|
|
if (this.showroomMode === 1) {
|
|
if (this.showroomMode === 1) {
|
|
this.showrooms[this.showroomI].classList.add('active')
|
|
this.showrooms[this.showroomI].classList.add('active')
|
|
this.showrooms[this.showroomI-1 < 0 ? this.showrooms.length -1 : this.showroomI-1].classList.remove('active')
|
|
this.showrooms[this.showroomI-1 < 0 ? this.showrooms.length -1 : this.showroomI-1].classList.remove('active')
|