mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: center the same layers
This commit is contained in:
1 parent
7a8df716da
commit
b19d6bf6e2
3 files changed
+55
-2
No files matched your search
@@ -30,6 +30,18 @@ export default class DAG {
|
||||
return Array.from(this.#edges.values())
|
||||
}
|
||||
|
||||
getLayers() {
|
||||
return this.#layers
|
||||
}
|
||||
|
||||
getLayer(id) {
|
||||
const node = this.getNode(id)
|
||||
if (!node) {
|
||||
throw new Error(`Node ${id} not found`)
|
||||
}
|
||||
return this.#layers[node.layer - 1]
|
||||
}
|
||||
|
||||
#setLayer(id) {
|
||||
const node = this.getNode(id)
|
||||
if (!node) {
|
||||
|
||||
Reference in new issue
Block a user