Adds clipped class to html root when opening full screen modal.

This commit is contained in:
Mateus Machado Luna 2018-10-01 16:59:23 -03:00
parent e8f7ec2aad
commit 9cd369653b
1 changed files with 5 additions and 0 deletions

View File

@ -554,11 +554,16 @@ export default {
this.$refs.mySwiper.swiper.initialSlide = this.slideIndex;
}
// Adds clipped class to root html
document.documentElement.classList.add('is-clipped');
},
beforeDestroy() {
clearInterval(this.intervalId);
if (this.$refs.mySwiper.swiper)
this.$refs.mySwiper.swiper.destroy();
// Remove clipped class from root html
document.documentElement.classList.remove('is-clipped');
}
}
</script>