Configuration and view context for the tree editor.
Layout dimensions for the tree editor, with the following fields:
canvasWidth: width of the canvas containing the entire editor interfacecanvasHeight: height of the canvas containing the entire editor interfacenodeWidth: width of a single nodenodeHeight: height of a single nodelevel: vertical offset between different levels of nodes (from the bottom of the parent to the top of the child)gutter: horizontal gutter between two sibling nodesThe state of a node at a given time. May be normal one of the following:
Normal: node in rest stateHovered: a hovered over nodeActive: an activated node. Overrides hoverDropTarget: indicates that a swap or insert of the dragged subtree will take place at this node upon releaseView context. Contains the following fields:
parent: the item at the parent, not available for the root nodesiblings: a list of all direct siblingschildren: a list of all direct childrenstate: node state
Global configuration for the editor module, consisting of two fields:
view: the view of a single node function, dependent on its Context and the item it holds (may beNothingin case of a placeholder). Since there are all sorts of event handlers on the node element containing this piece of html, the library essentially disallows any messages (it does so by expecting the message type to be ofMsg item, but does not actually expose anyMsgconstructors)layout: bits of geometry information, detailed here