mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-01 03:23:11 +00:00
Merge pull request #10794 from overleaf/td-resize-while-loading
Ensure editor is the correct size after window resize during load GitOrigin-RevId: 0677ef6aa5d1dd7b6aea9158343b8ccbb3a6562b
This commit is contained in:
parent
fa67c3fcff
commit
fde8ab422b
2 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,7 @@ class LoadingManager {
|
||||||
this.$scope.$apply(() => {
|
this.$scope.$apply(() => {
|
||||||
this.$scope.state.load_progress = 100
|
this.$scope.state.load_progress = 100
|
||||||
this.$scope.state.loading = false
|
this.$scope.state.loading = false
|
||||||
|
this.$scope.$emit('editor:loaded')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// Note: this will only catch errors in from i18n setup. ConnectionManager
|
// Note: this will only catch errors in from i18n setup. ConnectionManager
|
||||||
|
|
|
@ -236,6 +236,12 @@ ng-click=\"handleClick()\">\
|
||||||
.$applyAsync(() => (customTogglerEl.scope().isOpen = false))
|
.$applyAsync(() => (customTogglerEl.scope().isOpen = false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure editor resizes after loading. This is to handle the case where
|
||||||
|
// the window has been resized while the editor is loading
|
||||||
|
scope.$on('editor:loaded', () => {
|
||||||
|
ide.$timeout(() => layout.resizeAll())
|
||||||
|
})
|
||||||
|
|
||||||
// Save state when exiting
|
// Save state when exiting
|
||||||
$(window).unload(() => {
|
$(window).unload(() => {
|
||||||
// Save only the state properties for the current layout, ignoring sublayouts inside it.
|
// Save only the state properties for the current layout, ignoring sublayouts inside it.
|
||||||
|
|
Loading…
Reference in a new issue