mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-26 14:34:27 +02:00
Fix touch events
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-cond-assign": 0,
|
"no-cond-assign": 0,
|
||||||
"no-console": 2,
|
"no-console": 0,
|
||||||
"no-constant-condition": 2,
|
"no-constant-condition": 2,
|
||||||
"no-control-regex": 2,
|
"no-control-regex": 2,
|
||||||
"no-debugger": 2,
|
"no-debugger": 2,
|
||||||
|
@@ -407,9 +407,10 @@ export default class WebSlides {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if it is disabled
|
* Checks if it is disabled
|
||||||
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
isDisabled() {
|
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 method;
|
||||||
let argument;
|
let argument;
|
||||||
|
|
||||||
if (DOM.isFocusableElement() || !this.ws_.isDisabled()) {
|
if (DOM.isFocusableElement() || this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,7 +71,7 @@ export default class Scroll {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onMouseWheel_(event) {
|
onMouseWheel_(event) {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@ export default class Touch {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onStart_(event) {
|
onStart_(event) {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ export default class Touch {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onMove_(event) {
|
onMove_(event) {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ export default class Touch {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onStop_() {
|
onStop_() {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1161,12 +1161,13 @@ var WebSlides = function () {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if it is disabled
|
* Checks if it is disabled
|
||||||
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
key: 'isDisabled',
|
key: 'isDisabled',
|
||||||
value: function 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 method = void 0;
|
||||||
var argument = 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1939,7 +1940,7 @@ var Scroll = function () {
|
|||||||
}, {
|
}, {
|
||||||
key: 'onMouseWheel_',
|
key: 'onMouseWheel_',
|
||||||
value: function onMouseWheel_(event) {
|
value: function onMouseWheel_(event) {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2110,7 +2111,7 @@ var Touch = function () {
|
|||||||
_createClass(Touch, [{
|
_createClass(Touch, [{
|
||||||
key: 'onStart_',
|
key: 'onStart_',
|
||||||
value: function onStart_(event) {
|
value: function onStart_(event) {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2137,7 +2138,7 @@ var Touch = function () {
|
|||||||
}, {
|
}, {
|
||||||
key: 'onMove_',
|
key: 'onMove_',
|
||||||
value: function onMove_(event) {
|
value: function onMove_(event) {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2159,7 +2160,7 @@ var Touch = function () {
|
|||||||
}, {
|
}, {
|
||||||
key: 'onStop_',
|
key: 'onStop_',
|
||||||
value: function onStop_() {
|
value: function onStop_() {
|
||||||
if (!this.ws_.isDisabled()) {
|
if (this.ws_.isDisabled()) {
|
||||||
return;
|
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