Objects - marcelklehr/buzzmap GitHub Wiki
When dealing with events, you may have noticed a node object being passed to some callbacks. These objects are for interacting with the nodes.
Node object
Here's a list of the important properties:
node.childrenAn array of all child nodes of the particular node.node.parentThe parent node object.node.elThe jQuery object of the div container representing the node on the screen.node.xThe x-coordinate of the node.node.yThe y-coordinate of the node.node.visibleTrue when the node is visible.node.editingTrue while the node is being edited.node.draggingTrue while the node is being dragged.node.objThe Buzzmap object.
Methods:
.toggleChildren()Toggle visibility of the child nodes..edit()Edit the node in the browser..removeNode()Removes the node..label([text])Getter and setter for the node's label.
Buzzmap object
The Buzzmap object is returned by the jQuery method $().buzzmap().
These are the important properties:
obj.rootThe root node.obj.nodesAn array of all nodes.obj.linesAn array of all connecting lines.obj.optionsThe global options, initially set with.buzzmap(). Altering this will change behaviour of all nodes.obj.canvasThe Raphael paper object (svgproperty contains the svg element)
Methods:
.addNode(parentNode, label)Adds a node to the mindmap as a child ofparentNode..seralize()Returns the structure of the mindmap serialized as a JSON string..animate()Start the animation..bind('onevent', callback)Register an event handler to listen for an event..unbind('onevent', callback)Remove a registered event handler.
See Events for a list of the available callbacks.