mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: revise fileGraph discover
This commit is contained in:
1 parent
3c41764f85
commit
02e1219228
2 files changed
+60
-17
No files matched your search
@@ -30,9 +30,13 @@ export default class FileGraph {
|
||||
// Overwrite the file graph with the provided files
|
||||
// Remove file nodes that don't exist anymore and add new ones
|
||||
|
||||
eventFiles.forEach((file) => {
|
||||
this.root.merge(file)
|
||||
const newNode = new FileNode(eventFiles[0])
|
||||
|
||||
eventFiles.slice(1).forEach((file) => {
|
||||
newNode.addChild(file, { makeParents: true })
|
||||
})
|
||||
|
||||
this.root.merge(newNode)
|
||||
}
|
||||
|
||||
handleEvent(event) {
|
||||
|
||||
Reference in new issue
Block a user