Merge pull request #6390 from overleaf/ae-is-visible-binary

[web] Only run updateOnResize when the PDF viewer is visible

GitOrigin-RevId: 90b5632f45406b66af7710c6e8346cf73ffbebea
This commit is contained in:
Alf Eaton 2022-01-19 11:54:52 +00:00 committed by Copybot
parent 5701cc9e4b
commit 1dd62570a6

View file

@ -114,6 +114,10 @@ export default class PDFJSWrapper {
// update the current scale value if the container size changes
updateOnResize() {
if (!this.isVisible()) {
return
}
const currentScaleValue = this.viewer.currentScaleValue
if (