Spaces:
Running
Running
Leire Aguirre
commited on
Commit
·
de593b3
1
Parent(s):
834ae60
prevent the root node from being displayed
Browse files- src/memory.js +1 -2
src/memory.js
CHANGED
@@ -252,7 +252,7 @@ export function updateGraph() {
|
|
252 |
}
|
253 |
|
254 |
const cell = svg.selectAll("g")
|
255 |
-
.data(root.descendants())
|
256 |
.join("g")
|
257 |
.attr("transform", d => `translate(${d.x0},${d.y0})`)
|
258 |
.on('mouseover', (event, d) => {
|
@@ -281,7 +281,6 @@ export function updateGraph() {
|
|
281 |
.attr("font-size", `${fontSize}px`)
|
282 |
.attr("font-family", "sans-serif")
|
283 |
.each(function (d) {
|
284 |
-
if (d.depth === 0) return; // Skip root node
|
285 |
|
286 |
const node = d3.select(this);
|
287 |
|
|
|
252 |
}
|
253 |
|
254 |
const cell = svg.selectAll("g")
|
255 |
+
.data(root.descendants().filter(d => d.depth !== 0)) // Skip root node
|
256 |
.join("g")
|
257 |
.attr("transform", d => `translate(${d.x0},${d.y0})`)
|
258 |
.on('mouseover', (event, d) => {
|
|
|
281 |
.attr("font-size", `${fontSize}px`)
|
282 |
.attr("font-family", "sans-serif")
|
283 |
.each(function (d) {
|
|
|
284 |
|
285 |
const node = d3.select(this);
|
286 |
|