Use proper private methods in web/pdf_find_bar.js
This commit is contained in:
parent
a1d106dc5d
commit
f33769db2d
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user