mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
save the pdf state when the directive is destroyed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user