mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3538 from overleaf/ta-file-tree-no-selection
[ReactFileTree] Update Editor View on Empty Selection GitOrigin-RevId: 18744cd64c2a012488c3d0969549ae464e752a4b
This commit is contained in:
parent
2ca6d2dadb
commit
e7c4ce6e80
2 changed files with 8 additions and 0 deletions
|
@ -58,6 +58,8 @@ App.controller('ReactFileTreeController', function(
|
|||
$scope.$emit('entities:multiSelected', {
|
||||
count: selectedEntities.length
|
||||
})
|
||||
} else {
|
||||
$scope.$emit('entity:no-selection')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -48,6 +48,12 @@ export default EditorManager = (function() {
|
|||
}
|
||||
})
|
||||
|
||||
this.$scope.$on('entity:no-selection', () => {
|
||||
this.$scope.$apply(() => {
|
||||
this.$scope.ui.view = null
|
||||
})
|
||||
})
|
||||
|
||||
this.$scope.$on('entity:deleted', (event, entity) => {
|
||||
if (this.$scope.editor.open_doc_id === entity.id) {
|
||||
if (!this.$scope.project.rootDoc_id) {
|
||||
|
|
Loading…
Reference in a new issue