Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ======================================================================== */
- /* 68. SliderFullscreenProjects */
- /* ======================================================================== */
- class SliderFullscreenProjects extends Slider {
- constructor({
- scope,
- target
- }) {
- super({
- target,
- scope
- });
- }
- ...
- _getSliderImages() {
- if (!this.$sliderImg.length) {
- return false;
- }
- return new Swiper(this.$sliderImg, {
- simulateTouch: this.dragMouse ? true : false,
- direction: this.$sliderImg.data('direction') || 'horizontal',
- slidesPerView: this.$sliderImg.data('slides-per-view') || 1,
- touchRatio: this.$sliderImg.data('touch-ratio') || 1,
- /////////////////////////////////////////////////////
- /////////////////////////////////////////////////////
- effect: 'fade',
- /////////////////////////////////////////////////////
- /////////////////////////////////////////////////////
- allowTouchMove: this.transitionEffect === 'distortion' ? false : true,
- fadeEffect: {
- crossFade: true
- },
- centeredSlides: true,
- parallax: true,
- speed: this.sliderSpeed,
- preloadImages: false,
- updateOnImagesReady: true,
- grabCursor: true,
- lazy: {
- loadPrevNextAmount: 4,
- loadPrevNext: true,
- loadOnTransitionStart: true
- },
- slideToClickedSlide: true,
- keyboard: {
- enabled: true,
- onlyInViewport: true
- },
- autoplay: {
- disableOnInteraction: false,
- enabled: this.$sliderImg.data('autoplay-enabled') || false,
- delay: this.$sliderImg.data('autoplay-delay') || 6000,
- },
- mousewheel: this.$sliderImg.data('mousewheel-enabled') ? {
- eventsTarged: this.$target.get(0),
- eventsTarget: this.$target.get(0),
- releaseOnEdges: true,
- } : false,
- pagination: {
- el: this.$el.find('.js-slider__dots').get(0),
- type: 'bullets',
- bulletElement: 'div',
- clickable: true,
- bulletClass: 'slider__dot',
- bulletActiveClass: 'slider__dot_active'
- },
- navigation: {
- nextEl: this.$el.find('.js-slider__arrow-next').get(0),
- prevEl: this.$el.find('.js-slider__arrow-prev').get(0),
- },
- controller: {
- control: [],
- by: 'container'
- },
- });
- }
- ...
- }
Add Comment
Please, Sign In to add comment