mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
save the pdf state when the directive is destroyed
This commit is contained in:
parent
5915bfd885
commit
407cecc0d3
1 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,10 @@ define [
|
|||
|
||||
#scope.position = pdfListView.getPdfPosition(true)
|
||||
|
||||
scope.$on "$destroy", () =>
|
||||
$.localStorage "pdf.scale", scope.scale
|
||||
$.localStorage "pdf.position.#{attrs.key}", scope.position
|
||||
|
||||
$(window).unload () =>
|
||||
$.localStorage "pdf.scale", scope.scale
|
||||
$.localStorage "pdf.position.#{attrs.key}", scope.position
|
||||
|
|
Loading…
Reference in a new issue