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.dispatchEvent("diacriticmatchingchange");
|
||||||
});
|
});
|
||||||
|
|
||||||
this.eventBus._on("resize", this._adjustWidth.bind(this));
|
this.eventBus._on("resize", this.#adjustWidth.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
@ -130,7 +130,7 @@ class PDFFindBar {
|
|||||||
|
|
||||||
findMsg.then(msg => {
|
findMsg.then(msg => {
|
||||||
this.findMsg.textContent = msg;
|
this.findMsg.textContent = msg;
|
||||||
this._adjustWidth();
|
this.#adjustWidth();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.updateResultsCount(matchesCount);
|
this.updateResultsCount(matchesCount);
|
||||||
@ -165,7 +165,7 @@ class PDFFindBar {
|
|||||||
this.findResultsCount.textContent = msg;
|
this.findResultsCount.textContent = msg;
|
||||||
// Since `updateResultsCount` may be called from `PDFFindController`,
|
// Since `updateResultsCount` may be called from `PDFFindController`,
|
||||||
// ensure that the width of the findbar is always updated correctly.
|
// 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.select();
|
||||||
this.findField.focus();
|
this.findField.focus();
|
||||||
|
|
||||||
this._adjustWidth();
|
this.#adjustWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
@ -202,10 +202,7 @@ class PDFFindBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#adjustWidth() {
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
_adjustWidth() {
|
|
||||||
if (!this.opened) {
|
if (!this.opened) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user