MCPcopy Create free account
hub / github.com/apache/echarts / getNodeById

Method getNodeById

src/data/Tree.ts:153–163  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

151 }
152
153 getNodeById(id: string): TreeNode {
154 if (this.getId() === id) {
155 return this;
156 }
157 for (let i = 0, children = this.children, len = children.length; i < len; i++) {
158 const res = children[i].getNodeById(id);
159 if (res) {
160 return res;
161 }
162 }
163 }
164
165 contains(node: TreeNode): boolean {
166 if (node === this) {

Callers

nothing calls this directly

Calls 2

getIdMethod · 0.95
getNodeByIdMethod · 0.45

Tested by

no test coverage detected