mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 11:04:12 -05:00
Always show current file in mini review panel
This commit is contained in:
parent
df420e0d21
commit
7c3a4dfa4d
1 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,7 @@ define [
|
|||
trackNewChanges: false
|
||||
hasEntries: false
|
||||
subView: $scope.SubViews.CUR_FILE
|
||||
openSubView: $scope.SubViews.CUR_FILE
|
||||
|
||||
$scope.commentState =
|
||||
adding: false
|
||||
|
@ -40,6 +41,18 @@ define [
|
|||
if subView == $scope.SubViews.CUR_FILE
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
$scope.$watch "ui.reviewPanelOpen", (open) ->
|
||||
console.log "ui.reviewPanelOpen", open
|
||||
return if !open?
|
||||
if !open
|
||||
# Always show current file when not open, but save current state
|
||||
$scope.reviewPanel.openSubView = $scope.reviewPanel.subView
|
||||
$scope.reviewPanel.subView = $scope.SubViews.CUR_FILE
|
||||
else
|
||||
# Reset back to what we had when previously open
|
||||
$scope.reviewPanel.subView = $scope.reviewPanel.openSubView
|
||||
|
||||
|
||||
changesTrackers = {}
|
||||
|
||||
$scope.$watch "editor.open_doc_id", (open_doc_id) ->
|
||||
|
|
Loading…
Reference in a new issue