cute-clever-carousel
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -14,3 +14,2 @@ import { Options } from './Options'; | ||
private itemsX; | ||
private isPassiveSupported; | ||
private touchEventListenerOption; | ||
@@ -17,0 +16,0 @@ constructor(element: Element, options: Options); |
@@ -33,4 +33,3 @@ "use strict"; | ||
} | ||
// passive 非対応ブラウザでカルーセルをスクロールしようとする場合、デフォルトのスクロールを止めないとうまく動かない | ||
if (!_this.isPassiveSupported && _this.touchingInfo.isHorizontalScroll === true) { | ||
if (_this.touchingInfo.isHorizontalScroll) { | ||
event.preventDefault(); | ||
@@ -55,4 +54,3 @@ } | ||
this.itemsElement = element.getElementsByClassName(this.options.itemsClassName)[0]; | ||
this.isPassiveSupported = isPassiveSupported_1.default(); | ||
this.touchEventListenerOption = this.isPassiveSupported ? { passive: true } : false; | ||
this.touchEventListenerOption = isPassiveSupported_1.default() ? { passive: false } : false; | ||
this.reset(); | ||
@@ -59,0 +57,0 @@ this.frameElement.addEventListener('touchstart', this.onTouchStart, this.touchEventListenerOption); |
{ | ||
"name": "cute-clever-carousel", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "js carousel", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
9731
228