MCPcopy Index your code
hub / github.com/hizzgdev/jsmind / expand_node

Method expand_node

src/jsmind.js:284–302  ·  view source on GitHub ↗

* Expand a node. * @param {string | import('./jsmind.node.js').Node} node * @returns {void}

(node)

Source from the content-addressed store, hash-verified

282 * @returns {void}
283 */
284 expand_node(node) {
285 if (!Node.is_node(node)) {
286 var the_node = this.get_node(node);
287 if (!the_node) {
288 logger.error('the node[id=' + node + '] can not be found.');
289 return;
290 } else {
291 this.expand_node(the_node);
292 return;
293 }
294 }
295 if (node.isroot) {
296 return;
297 }
298 this.view.save_location(node);
299 this.layout.expand_node(node);
300 this.view.relayout();
301 this.view.restore_location(node);
302 }
303 /**
304 * Collapse a node.
305 * @param {string | import('./jsmind.node.js').Node} node

Callers 4

_refresh_node_uiMethod · 0.95
expandFunction · 0.45
jsmind.jsFile · 0.45
jsmind.test.jsFile · 0.45

Calls 5

get_nodeMethod · 0.95
save_locationMethod · 0.80
relayoutMethod · 0.80
restore_locationMethod · 0.80
is_nodeMethod · 0.45

Tested by

no test coverage detected