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-20 09:03:28 +00:00
committed by Copybot
parent 20db41900f
commit b4f6382507
@@ -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 (