mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02: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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user