mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-26 06:24:28 +02:00
Fix touch events
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"rules": {
|
||||
"no-cond-assign": 0,
|
||||
"no-console": 2,
|
||||
"no-console": 0,
|
||||
"no-constant-condition": 2,
|
||||
"no-control-regex": 2,
|
||||
"no-debugger": 2,
|
||||
|
@@ -407,9 +407,10 @@ export default class WebSlides {
|
||||
|
||||
/**
|
||||
* Checks if it is disabled
|
||||
* @return {boolean}
|
||||
*/
|
||||
isDisabled() {
|
||||
this.el.classList.contains(CLASSES.DISABLED);
|
||||
return this.el.classList.contains(CLASSES.DISABLED);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -29,7 +29,7 @@ export default class Keyboard {
|
||||
let method;
|
||||
let argument;
|
||||
|
||||
if (DOM.isFocusableElement() || !this.ws_.isDisabled()) {
|
||||
if (DOM.isFocusableElement() || this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -71,7 +71,7 @@ export default class Scroll {
|
||||
* @private
|
||||
*/
|
||||
onMouseWheel_(event) {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -108,7 +108,7 @@ export default class Touch {
|
||||
* @private
|
||||
*/
|
||||
onStart_(event) {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ export default class Touch {
|
||||
* @private
|
||||
*/
|
||||
onMove_(event) {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ export default class Touch {
|
||||
* @private
|
||||
*/
|
||||
onStop_() {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1161,12 +1161,13 @@ var WebSlides = function () {
|
||||
|
||||
/**
|
||||
* Checks if it is disabled
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'isDisabled',
|
||||
value: function isDisabled() {
|
||||
this.el.classList.contains(CLASSES.DISABLED);
|
||||
return this.el.classList.contains(CLASSES.DISABLED);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1586,7 +1587,7 @@ var Keyboard = function () {
|
||||
var method = void 0;
|
||||
var argument = void 0;
|
||||
|
||||
if (__WEBPACK_IMPORTED_MODULE_1__utils_dom__["a" /* default */].isFocusableElement() || !this.ws_.isDisabled()) {
|
||||
if (__WEBPACK_IMPORTED_MODULE_1__utils_dom__["a" /* default */].isFocusableElement() || this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1939,7 +1940,7 @@ var Scroll = function () {
|
||||
}, {
|
||||
key: 'onMouseWheel_',
|
||||
value: function onMouseWheel_(event) {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2110,7 +2111,7 @@ var Touch = function () {
|
||||
_createClass(Touch, [{
|
||||
key: 'onStart_',
|
||||
value: function onStart_(event) {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2137,7 +2138,7 @@ var Touch = function () {
|
||||
}, {
|
||||
key: 'onMove_',
|
||||
value: function onMove_(event) {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2159,7 +2160,7 @@ var Touch = function () {
|
||||
}, {
|
||||
key: 'onStop_',
|
||||
value: function onStop_() {
|
||||
if (!this.ws_.isDisabled()) {
|
||||
if (this.ws_.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
2
static/js/webslides.min.js
vendored
2
static/js/webslides.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user