Keep track of pdf layout hidden state

This commit is contained in:
Alasdair Smith 2017-09-25 15:46:29 +01:00
parent 2d3bae2f7b
commit e31464b47d

View file

@ -71,11 +71,12 @@ define [
view: "editor"
chatOpen: false
pdfLayout: 'sideBySide'
pdfHidden: false,
reviewPanelOpen: localStorage("ui.reviewPanelOpen.#{window.project_id}")
miniReviewPanelVisible: false
}
$scope.user = window.user
$scope.$watch "project.features.trackChangesVisible", (visible) ->
return if !visible?
$scope.ui.showCollabFeaturesOnboarding = window.showTrackChangesOnboarding and visible
@ -99,6 +100,9 @@ define [
if value?
localStorage "ui.reviewPanelOpen.#{window.project_id}", value
$scope.$on "layout:pdf:resize", (_, layoutState) ->
$scope.ui.pdfHidden = layoutState.east.initClosed
# Tracking code.
$scope.$watch "ui.view", (newView, oldView) ->
if newView? and newView != "editor" and newView != "pdf"