apply suggustion

This commit is contained in:
grafixeyehero 2020-01-22 18:31:01 +03:00
parent a28596dc6f
commit 0c9ae31417
2 changed files with 14 additions and 7 deletions

View File

@ -114,12 +114,17 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
countStart++; countStart++;
var deltaX = endX - (backgroundTouchStartX || 0); var deltaX = endX - (backgroundTouchStartX || 0);
if (1 === countStart && (startPoint = deltaX), deltaX < 0 && 2 !== dragMode) { if (countStart == 1) {
dragMode = 1; startPoint = deltaX;
newPos = deltaX - startPoint + options.width; }
self.changeMenuPos(); if (deltaX < 0) {
var time = new Date().getTime() - (backgroundTouchStartTime || 0); if (dragMode !== 2) {
velocity = Math.abs(deltaX) / time; dragMode = 1;
newPos = deltaX - startPoint + options.width;
self.changeMenuPos();
var time = new Date().getTime() - (backgroundTouchStartTime || 0);
velocity = Math.abs(deltaX) / time;
}
} }
} }
@ -262,6 +267,7 @@ define(["browser", "dom", "css!./navdrawer", "scrollStyles"], function (browser,
}; };
TouchMenuLA.prototype.hideMask = function () { TouchMenuLA.prototype.hideMask = function () {
mask.classList.add("hide");
mask.classList.remove("backdrop"); mask.classList.remove("backdrop");
}; };

View File

@ -9,7 +9,8 @@ define(["loading", "libraryMenu", "globalize", "emby-checkbox", "emby-select"],
var validationResult = getValidationAlert(form); var validationResult = getValidationAlert(form);
if (validationResult) { if (validationResult) {
return void alertText(validationResult); alertText(validationResult);
return;
} }
validateHttps(form).then(function () { validateHttps(form).then(function () {