@painekillers/tree-builder-viewer 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/viewer.js +9 -0
package/package.json
CHANGED
package/viewer.js
CHANGED
|
@@ -42,12 +42,21 @@ export default class Viewer {
|
|
|
42
42
|
recurse = true
|
|
43
43
|
strategy = "First"
|
|
44
44
|
/*
|
|
45
|
+
Recursion settings
|
|
45
46
|
Null: No recursion
|
|
46
47
|
False: Creates fake nodes when encountering recursion
|
|
47
48
|
True: Connects back to existing instance of a node when recursing
|
|
48
49
|
#: Real recursion to depths #
|
|
49
50
|
*/
|
|
50
51
|
|
|
52
|
+
/*
|
|
53
|
+
Strategies
|
|
54
|
+
- [X] Current BFS (First) — Layer by shortest distance from root; first discovery determines placement.
|
|
55
|
+
- [X] Undirected BFS (Undirected) — Shortest distance to root; layering is on directional.
|
|
56
|
+
- [X] Directed BFS, outward only (Outwards) — Follow prerequisite-to-dependent edges only.
|
|
57
|
+
- [X] Furthest-parent layering (Furthest) — Place each node one layer below its deepest prerequisite.
|
|
58
|
+
*/
|
|
59
|
+
|
|
51
60
|
constructor(container, themes) {
|
|
52
61
|
this.#container = container
|
|
53
62
|
|