MCPcopy Create free account
hub / github.com/hizzgdev/jsmind / select_node

Method select_node

src/jsmind.js:779–796  ·  view source on GitHub ↗

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

(node)

Source from the content-addressed store, hash-verified

777 * @returns {void}
778 */
779 select_node(node) {
780 if (!Node.is_node(node)) {
781 var the_node = this.get_node(node);
782 if (!the_node) {
783 logger.error('the node[id=' + node + '] can not be found.');
784 return;
785 } else {
786 this.select_node(the_node);
787 return;
788 }
789 }
790 if (!this.layout.is_visible(node)) {
791 return;
792 }
793 this.mind.selected = node;
794 this.view.select_node(node);
795 this.invoke_event_handle(EventType.select, { evt: 'select_node', data: [], node: node.id });
796 }
797 /** @returns {import('./jsmind.node.js').Node|null} */
798 get_selected_node() {
799 if (!!this.mind) {

Callers 12

mousedown_handleMethod · 0.95
select_nodeFunction · 0.45
jsmind.jsFile · 0.45
jsmind.shell.jsFile · 0.45
handle_addchildMethod · 0.45
handle_addbrotherMethod · 0.45
handle_delnodeMethod · 0.45
handle_upMethod · 0.45
handle_downMethod · 0.45
_handle_directionMethod · 0.45
typescript-test.tsFile · 0.45
jsmind.test.jsFile · 0.45

Calls 4

get_nodeMethod · 0.95
invoke_event_handleMethod · 0.95
is_visibleMethod · 0.80
is_nodeMethod · 0.45

Tested by

no test coverage detected