Add class when review panel should layout to the left.

This commit is contained in:
Paulo Reis 2017-01-12 16:49:47 +00:00
parent 9f008318cc
commit e3e8541a63
2 changed files with 11 additions and 0 deletions

View file

@ -18,6 +18,7 @@ div.full-size(
'rp-state-overview': (reviewPanel.subView === SubViews.OVERVIEW),\
'rp-size-mini': (!ui.reviewPanelOpen && reviewPanel.hasEntries),\
'rp-size-expanded': ui.reviewPanelOpen\
'rp-layout-left': reviewPanel.layoutToLeft
}"
)
.loading-panel(ng-show="!editor.sharejs_doc || editor.opening")

View file

@ -22,6 +22,16 @@ define [
loading: false
commentThreads: {}
resolvedThreadIds: {}
layoutToLeft: false
$scope.$on "layout:pdf:linked", (event, state) ->
$scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed)
$scope.$on "layout:pdf:resize", (event, state) ->
$scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed)
$scope.$watch "ui.pdfLayout", (layout) ->
$scope.reviewPanel.layoutToLeft = (layout == "flat")
$scope.commentState =
adding: false