MCPcopy Create free account
hub / github.com/google/pprof / toggleSvgSelect

Function toggleSvgSelect

internal/driver/html/common.js:487–505  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

485 }
486
487 function toggleSvgSelect(elem) {
488 // Walk up to immediate child of graph0
489 while (elem != null && elem.parentElement != graph0) {
490 elem = elem.parentElement;
491 }
492 if (!elem) return;
493
494 // Disable regexp mode.
495 regexpActive = false;
496
497 const n = nodeId(elem);
498 if (n < 0) return;
499 if (selected.has(n)) {
500 unselect(n);
501 } else {
502 select(n);
503 }
504 updateButtons();
505 }
506
507 function unselect(n) {
508 if (setNodeHighlight(n, false)) selected.delete(n);

Callers

nothing calls this directly

Calls 4

nodeIdFunction · 0.85
unselectFunction · 0.85
selectFunction · 0.85
updateButtonsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…