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

Function add_node

example/2_features.js:155–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155function add_node() {
156 var selected_node = _jm.get_selected_node(); // as parent of new node
157 if (!selected_node) {
158 prompt_info('please select a node first.');
159 return;
160 }
161
162 var nodeid = jsMind.util.uuid.newid();
163 var topic = '* Node_' + nodeid.substr(nodeid.length - 6) + ' *';
164 var node = _jm.add_node(selected_node, nodeid, topic);
165}
166
167var imageChooser = document.getElementById('image-chooser');
168

Callers

nothing calls this directly

Calls 3

prompt_infoFunction · 0.85
get_selected_nodeMethod · 0.80
add_nodeMethod · 0.45

Tested by

no test coverage detected