Use proper private methods in web/pdf_find_bar.js

This commit is contained in:
Tim van der Meij 2022-03-06 15:41:38 +01:00
parent a1d106dc5d
commit f33769db2d
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -87,7 +87,7 @@ class PDFFindBar {
this.dispatchEvent("diacriticmatchingchange");
});
this.eventBus._on("resize", this._adjustWidth.bind(this));
this.eventBus._on("resize", this.#adjustWidth.bind(this));
}
reset() {
@ -130,7 +130,7 @@ class PDFFindBar {
findMsg.then(msg => {
this.findMsg.textContent = msg;
this._adjustWidth();
this.#adjustWidth();
});
this.updateResultsCount(matchesCount);
@ -165,7 +165,7 @@ class PDFFindBar {
this.findResultsCount.textContent = msg;
// Since `updateResultsCount` may be called from `PDFFindController`,
// ensure that the width of the findbar is always updated correctly.
this._adjustWidth();
this.#adjustWidth();
});
}
@ -179,7 +179,7 @@ class PDFFindBar {
this.findField.select();
this.findField.focus();
this._adjustWidth();
this.#adjustWidth();
}
close() {
@ -202,10 +202,7 @@ class PDFFindBar {
}
}
/**
* @private
*/
_adjustWidth() {
#adjustWidth() {
if (!this.opened) {
return;
}