mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
refactor: move VisibleNodesGenerator
This commit is contained in:
parent
f23a991267
commit
0dfb932d04
1 changed files with 6 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { EventHub } from './EventHub'
|
||||
import { findNode, traverse, withEffect } from './general'
|
||||
import { EventHub } from '../EventHub'
|
||||
import { findNode, traverse, withEffect } from '../general'
|
||||
|
||||
function search(
|
||||
root: TreeNode,
|
||||
|
|
@ -305,7 +305,10 @@ class FlattenLayer extends CompressLayer {
|
|||
}
|
||||
}, this.generateVisibleNodes)
|
||||
|
||||
search = (searchParams: Pick<SearchParams, 'matchNode'> | null, restoreExpandedFolders?: boolean) => {
|
||||
search = (
|
||||
searchParams: Pick<SearchParams, 'matchNode'> | null,
|
||||
restoreExpandedFolders?: boolean,
|
||||
) => {
|
||||
// backup expansion before search
|
||||
if (searchParams) {
|
||||
if (!this.isSearching) {
|
||||
Loading…
Reference in a new issue