Resize on toggling review panel

This commit is contained in:
James Allen 2016-11-15 16:21:45 +00:00
parent 8a11c8c3ca
commit 829ccb6641
2 changed files with 3 additions and 1 deletions

View file

@ -33,7 +33,7 @@ div.full-size(
last-updated="editor.last_updated", last-updated="editor.last_updated",
cursor-position="editor.cursorPosition", cursor-position="editor.cursorPosition",
goto-line="editor.gotoLine", goto-line="editor.gotoLine",
resize-on="layout:main:resize,layout:pdf:resize,layout:review:resize,reviewPanel:toggle", resize-on="layout:main:resize,layout:pdf:resize,layout:review:resize,review-panel:toggle",
annotations="pdf.logEntryAnnotations[editor.open_doc_id]", annotations="pdf.logEntryAnnotations[editor.open_doc_id]",
read-only="!permissions.write", read-only="!permissions.write",
file-name="editor.open_doc_name", file-name="editor.open_doc_name",

View file

@ -59,6 +59,8 @@ define [
else else
scroller.off "scroll" scroller.off "scroll"
$scope.onScroll = null $scope.onScroll = null
$timeout () ->
$scope.$broadcast "review-panel:toggle"
$scope.$watch (() -> Object.keys($scope.reviewPanel.entries).length), (nEntries) -> $scope.$watch (() -> Object.keys($scope.reviewPanel.entries).length), (nEntries) ->
$scope.reviewPanel.hasEntries = nEntries > 0 $scope.reviewPanel.hasEntries = nEntries > 0