MCPcopy Create free account
hub / github.com/Nynxz/ComfyUI-IdeogramHelper / removeElement

Function removeElement

web/main.js:8011–8020  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

8009 return el;
8010 },
8011 removeElement(id) {
8012 const src = store.getElement(id);
8013 const lid = src?.linkId ?? null;
8014 const grp = src?.groupId ?? null;
8015 const i = store.state.elements.findIndex((e) => e.id === id);
8016 if (i >= 0) store.state.elements.splice(i, 1);
8017 store.selectedIds = store.selectedIds.filter((x) => x !== id);
8018 _pruneLink(store.state.elements, lid);
8019 _pruneGroup(store.state.elements, grp);
8020 },
8021 duplicateElement(id) {
8022 const src = store.getElement(id);
8023 if (!src) return;

Callers

nothing calls this directly

Calls 3

getElementMethod · 0.80
_pruneLinkFunction · 0.70
_pruneGroupFunction · 0.70

Tested by

no test coverage detected