chore(ui): clear eslint expression cleanup bucket
Replace remaining side-effect ternaries with explicit control flow and drop unused error bindings so the affected editors and readers satisfy the current TypeScript lint rules. Validation: just ui lint
This commit is contained in:
@@ -927,16 +927,28 @@ export class CbxReaderComponent implements OnInit, OnDestroy {
|
||||
|
||||
switch (event.key) {
|
||||
case 'ArrowRight':
|
||||
isRtl ? this.previousPage() : this.nextPage();
|
||||
if (isRtl) {
|
||||
this.previousPage();
|
||||
} else {
|
||||
this.nextPage();
|
||||
}
|
||||
event.preventDefault();
|
||||
break;
|
||||
case 'ArrowLeft':
|
||||
isRtl ? this.nextPage() : this.previousPage();
|
||||
if (isRtl) {
|
||||
this.nextPage();
|
||||
} else {
|
||||
this.previousPage();
|
||||
}
|
||||
event.preventDefault();
|
||||
break;
|
||||
case ' ':
|
||||
event.preventDefault();
|
||||
event.shiftKey ? this.previousPage() : this.nextPage();
|
||||
if (event.shiftKey) {
|
||||
this.previousPage();
|
||||
} else {
|
||||
this.nextPage();
|
||||
}
|
||||
break;
|
||||
case 'Home':
|
||||
event.preventDefault();
|
||||
@@ -1073,7 +1085,11 @@ export class CbxReaderComponent implements OnInit, OnDestroy {
|
||||
// In RTL mode, swipe directions are reversed
|
||||
const isRtl = this.readingDirection === CbxReadingDirection.RTL;
|
||||
const shouldGoNext = isRtl ? delta > 0 : delta < 0;
|
||||
shouldGoNext ? this.nextPage() : this.previousPage();
|
||||
if (shouldGoNext) {
|
||||
this.nextPage();
|
||||
} else {
|
||||
this.previousPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user