supercharged-slider
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -219,2 +219,3 @@ var index = ""; | ||
callback: (slider) => { | ||
slider.element.classList.add("s-slider-touchable"); | ||
const isVertical = () => slider.direction === "vertical"; | ||
@@ -279,2 +280,7 @@ const isTargetValid = (e) => e.composedPath().includes(slider.wrapper); | ||
document.addEventListener("mouseup", onMouseUp); | ||
slider.slides.forEach((slide) => { | ||
getElements(slide.querySelectorAll("img")).forEach((img) => { | ||
img.setAttribute("draggable", "false"); | ||
}); | ||
}); | ||
const onCleanUp = () => { | ||
@@ -281,0 +287,0 @@ isDragging = false; |
{ | ||
"name": "supercharged-slider", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "A super modular tiny slider library.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -16,3 +16,2 @@ import './demo.scss'; | ||
middlewares: [ | ||
touch(), | ||
vertical(), | ||
@@ -25,3 +24,2 @@ ], | ||
middlewares: [ | ||
touch(), | ||
spaceBetween(16), | ||
@@ -38,3 +36,3 @@ slidesPerView(6), | ||
element: '.s-slider-3', | ||
middlewares: [slidesPerView(2), lazyload(), activeClass(), navigation({ | ||
middlewares: [slidesPerView(2), lazyload(), touch(), activeClass(), navigation({ | ||
prev: '.s-slider-2 .s-navigation-button-prev', | ||
@@ -41,0 +39,0 @@ next: '.s-slider-2 .s-navigation-button-next', |
import { Middleware } from '~/types'; | ||
import { getElements } from '~/utils/getElement'; | ||
@@ -7,2 +8,4 @@ // TODO: TOUCH HALA PROBLEMLİ, MOBİLDE! | ||
callback: (slider) => { | ||
slider.element.classList.add('s-slider-touchable'); | ||
const isVertical = () => slider.direction === 'vertical'; | ||
@@ -85,2 +88,8 @@ const isTargetValid = (e: MouseEvent) => e.composedPath().includes(slider.wrapper); | ||
slider.slides.forEach((slide) => { | ||
getElements(slide.querySelectorAll('img')).forEach((img) => { | ||
img.setAttribute('draggable', 'false'); | ||
}); | ||
}); | ||
const onCleanUp = () => { | ||
@@ -87,0 +96,0 @@ isDragging = false; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
411135
10744