Skip to content

Commit

Permalink
PDF go btn and zoom btns, a11 click, space now works to trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
LlGC-jop committed Oct 22, 2024
1 parent 7432318 commit 570ac54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ export class PDFCenterPanel extends CenterPanel<

this.disableNextButton();

this._$zoomInButton.onPressed((e: any) => {
e.preventDefault();

this.onAccessibleClick(this._$zoomInButton, () => {
const newScale: number = this._scale + 0.5;

if (newScale < this._maxScale) {
Expand All @@ -197,11 +195,9 @@ export class PDFCenterPanel extends CenterPanel<
}

this._render(this._pageIndex);
});

this._$zoomOutButton.onPressed((e: any) => {
e.preventDefault();
}, true, true);

this.onAccessibleClick(this._$zoomOutButton, () => {
const newScale: number = this._scale - 0.5;

if (newScale > this._minScale) {
Expand All @@ -211,7 +207,7 @@ export class PDFCenterPanel extends CenterPanel<
}

this._render(this._pageIndex);
});
}, true, true);
}

disablePrevButton(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ export class PDFHeaderPanel extends HeaderPanel<
$(this).select();
});

this.$searchButton.onPressed(() => {
this.onAccessibleClick(this.$searchButton, () => {
this.search(this.$searchText.val());
});
}, true, true);
}

render(): void {
Expand Down

0 comments on commit 570ac54

Please sign in to comment.