Skip to content
This repository was archived by the owner on Jul 20, 2019. It is now read-only.

Commit ae5178a

Browse files
committed
expose some field public
1 parent 1503aac commit ae5178a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

projects/pdfjs-box/src/lib/components/pdfjs-view/pdfjs-view.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ export class PdfjsViewComponent implements OnDestroy, AfterViewInit {
136136
});
137137
}
138138

139+
public hasPageSelected(): boolean {
140+
return !!this._pdfjsControl ? !isNaN(this._pdfjsControl.getPageIndex()) : false;
141+
}
142+
139143
private getViewport(pdfPageProxy: PDFPageProxy, scale, rotate): PDFPageViewport {
140144
if (pdfPageProxy) {
141145
const rot = pdfPageProxy.rotate + (rotate || 0);
@@ -184,7 +188,7 @@ export class PdfjsViewComponent implements OnDestroy, AfterViewInit {
184188
* mousewheel
185189
*/
186190
@HostListener('mousewheel', ['$event'])
187-
private onMouseWheel(event: WheelEvent) {
191+
public onMouseWheel(event: WheelEvent) {
188192
if (!this.mouseWheelNav) {
189193
return;
190194
}
@@ -214,22 +218,18 @@ export class PdfjsViewComponent implements OnDestroy, AfterViewInit {
214218
* set focus
215219
*/
216220
@HostListener('click', ['$event'])
217-
private onFocus(event: MouseEvent) {
221+
public onFocus(event: MouseEvent) {
218222
if (this.keysNav && this._pdfjsControl) {
219223
event.stopPropagation();
220224
this.keysService.setPdfjsControl(this._pdfjsControl);
221225
}
222226
}
223227

224228
// @HostListener('window:resize', ['$event'])
225-
private onResize(evt) {
229+
public onResize(evt) {
226230
console.log(evt);
227231
}
228232

229-
private hasPageSelected(): boolean {
230-
return !!this._pdfjsControl ? !isNaN(this._pdfjsControl.getPageIndex()) : false;
231-
}
232-
233233
private setPdfjsGroupControl(pdfjsGroupControl: PdfjsGroupControl) {
234234
pdfjsGroupControl.selectedPdfjsControl$.pipe(
235235
tap((pdfjsControl: PdfjsControl) => {

0 commit comments

Comments
 (0)