Unverified Commit e15f82bf authored by alexpott's avatar alexpott
Browse files

Issue #2983365 by ApacheEx, m1r1k, drpal: JS codestyle: operator-linebreak

parent 3fe7057f
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
"requireReturn": false "requireReturn": false
}], }],
"brace-style": ["error", "stroustrup"], "brace-style": ["error", "stroustrup"],
"no-unused-vars": ["warn"] "no-unused-vars": ["warn"],
"operator-linebreak": ["error", "after"]
} }
} }
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"max-len": "off", "max-len": "off",
"default-case": "off", "default-case": "off",
"prefer-destructuring": "off", "prefer-destructuring": "off",
"operator-linebreak": "off",
"react/no-this-in-sfc": "off", "react/no-this-in-sfc": "off",
"react/destructuring-assignment": "off", "react/destructuring-assignment": "off",
"import/named": "off" "import/named": "off"
......
...@@ -1040,9 +1040,9 @@ ...@@ -1040,9 +1040,9 @@
$newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#comment' ||
($newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)) ($newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent))
), ),
).length > 1 ).length > 1 ?
? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) :
: $newContent $newContent
); );
/** /**
......
...@@ -702,8 +702,10 @@ ...@@ -702,8 +702,10 @@
// Stop any current scrolling. // Stop any current scrolling.
clearInterval(self.scrollInterval); clearInterval(self.scrollInterval);
// Continue scrolling if the mouse has moved in the scroll direction. // Continue scrolling if the mouse has moved in the scroll direction.
if ((scrollAmount > 0 && self.rowObject.direction === 'down') if (
|| (scrollAmount < 0 && self.rowObject.direction === 'up')) { (scrollAmount > 0 && self.rowObject.direction === 'down') ||
(scrollAmount < 0 && self.rowObject.direction === 'up')
) {
self.setScroll(scrollAmount); self.setScroll(scrollAmount);
} }
...@@ -1129,8 +1131,10 @@ ...@@ -1129,8 +1131,10 @@
self.checkScroll(self.currentPointerCoords.y); self.checkScroll(self.currentPointerCoords.y);
const aboveTable = self.scrollY > self.table.topY; const aboveTable = self.scrollY > self.table.topY;
const belowTable = self.scrollY + self.windowHeight < self.table.bottomY; const belowTable = self.scrollY + self.windowHeight < self.table.bottomY;
if ((scrollAmount > 0 && belowTable) if (
|| (scrollAmount < 0 && aboveTable)) { (scrollAmount > 0 && belowTable) ||
(scrollAmount < 0 && aboveTable)
) {
window.scrollBy(0, scrollAmount); window.scrollBy(0, scrollAmount);
} }
}, this.scrollSettings.interval); }, this.scrollSettings.interval);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment