Skip to content

๐Ÿงฐ Functions โ€‹

โš™๏ธ createTopic โ€‹

FunctionType
createTopic(node: Node<ITopicNodeAttrs>, context: NodeToCanvasContext) => Box

๐Ÿ”— Source

โš™๏ธ toCanvas โ€‹

FunctionType
toCanvas(node: Node<ITopicNodeAttrs and { marginHeight: string; marginWidth: string; childMarginHeight: string; childMarginWidth: string; theme: string; structure: string; left?: string or undefined; top?: string or undefined; }>, context: NodeToCanvasContext) => Box

๐Ÿ”— Source

โš™๏ธ string2Yjs โ€‹

FunctionType
string2Yjs(xmlString: string) => Uint8Array

๐Ÿ”— Source

โš™๏ธ yjs2string โ€‹

FunctionType
yjs2string(doc: Doc) => string

๐Ÿ”— Source

โš™๏ธ getDefaultData โ€‹

FunctionType
getDefaultData() => string

๐Ÿ”— Source

โš™๏ธ getClassName โ€‹

FunctionType
getClassName(from: NodeView, to: NodeView) => string

๐Ÿ”— Source

โš™๏ธ connectNodeView โ€‹

FunctionType
connectNodeView(this: EdgeLine) => void

๐Ÿ”— Source

โš™๏ธ createLine โ€‹

FunctionType
createLine(this: ILayoutController, from: NodeView, to: NodeView, isHorizontal: boolean) => void

๐Ÿ”— Source

โš™๏ธ nonLayeredTidyTree โ€‹

FunctionType
nonLayeredTidyTree(this: ILayoutController, nodeView: NodeView, isHorizontal: boolean or undefined, children: View<UI>[], offset?: number) => void

๐Ÿ”— Source

โš™๏ธ right2left โ€‹

ๅณไพง็š„ๆ ‘ๅŸบไบŽๆŸไธช่Š‚็‚น่‡ชๅŠจๆ—‹่ฝฌ

FunctionType
right2left(reference: NodeView, child?: NodeView[] or undefined) => void

๐Ÿ”— Source

โš™๏ธ layout โ€‹

่Žทๅ–ไธ€ไธช่Š‚็‚นๆ˜ฏๅทฆไพง่ฟ˜ๆ˜ฏๅณไพง

FunctionType
layout(this: ILayoutController, node: View<UI>) => void

๐Ÿ”— Source

โš™๏ธ layout โ€‹

FunctionType
layout(this: ILayoutController, node: View<UI>) => void

๐Ÿ”— Source

โš™๏ธ layout โ€‹

FunctionType
layout(this: ILayoutController, node: View<UI>) => void

๐Ÿ”— Source

โš™๏ธ moveRootMindmapToCenter โ€‹

็งปๅŠจๅˆฐไธญๅฟƒ

FunctionType
moveRootMindmapToCenter() => Command

๐Ÿ”— Source

โš™๏ธ createSubTopic โ€‹

ๅˆ›ๅปบๅญ่Š‚็‚น

FunctionType
createSubTopic(topic: Node<any>, storage: IStorage) => Command

๐Ÿ”— Source

โš™๏ธ Tab โ€‹

FunctionType
Tab(state: State, view: BoardView) => boolean

๐Ÿ”— Source

๐Ÿ”ง Constants โ€‹

โš™๏ธ VIEW_KEY โ€‹

ConstantType
VIEW_KEY"__Y_MINDMAP_VIEW__"

๐Ÿ”— Source

โš™๏ธ theme โ€‹

ConstantType
themeTheme

๐Ÿ”— Source

โš™๏ธ topic โ€‹

ConstantType
topicNodeType<NodeSpec<ITopicNodeAttrs>>

๐Ÿ”— Source

โš™๏ธ CLASS_NAME โ€‹

ConstantType
CLASS_NAME"_mindmap-edge-line_"

๐Ÿ”— Source

โš™๏ธ structures โ€‹

ConstantType
structures{ left: (this: ILayoutController, node: View<UI>) => void; right: (this: ILayoutController, node: View<UI>) => void; standard: (this: ILayoutController, node: View<...>) => void; }

๐Ÿ”— Source

๐Ÿญ Schema โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ registerNode โ€‹

MethodType
registerNode(node: NodeType<NodeSpec<any>>) => void

๐Ÿ”— Source

โš™๏ธ parseNode โ€‹

parseNode from xmlElement

MethodType
parseNode(xml: YXmlElement<{ [key: string]: string; }> or YXmlText) => Node<any> or null

๐Ÿ”— Source

โš™๏ธ createNode โ€‹

createNode

MethodType
createNode(type: string or NodeType<NodeSpec<any>>, attrs: IAttrs, content: INodeContent) => Node<any>

๐Ÿ”— Source

๐Ÿญ NodeType โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ setSchema โ€‹

MethodType
setSchema(schema: Schema) => void

๐Ÿ”— Source

โš™๏ธ create โ€‹

MethodType
create(attrs?: IAttrs, content?: INodeContent, initYFragment?: YXmlElement<{ [key: string]: string; }> or YXmlText or null) => Node<any>

๐Ÿ”— Source

โš™๏ธ parse โ€‹

MethodType
parse(xml: YXmlElement<{ [key: string]: string; }> or YXmlText) => Node<any>

๐Ÿ”— Source

โš™๏ธ createNode โ€‹

MethodType
createNode<T extends NodeSpec<any>>(options: { name: string; } and T) => NodeType<T>

๐Ÿ”— Source

๐Ÿญ Node โ€‹

ไธ€ไธชๅŸบ็ก€็š„node ไฝœไธบๅฎšไน‰่ฝฌไธบyjs็š„ไปฃ็†

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ appendChild โ€‹

MethodType
appendChild(node: Node<any>, reference?: Node<any> or undefined) => void

๐Ÿ”— Source

โš™๏ธ removeChild โ€‹

MethodType
removeChild(node: Node<any>) => void

๐Ÿ”— Source

๐Ÿญ View โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ pointFromPos โ€‹

MethodType
pointFromPos(pos: number, preferBefore: boolean) => { object: UI or null; offset: number; }

๐Ÿ”— Source

โš™๏ธ destroy โ€‹

MethodType
destroy() => void

๐Ÿ”— Source

โš™๏ธ nodeAt โ€‹

MethodType
nodeAt(node: Node<any>) => View<UI> or undefined

๐Ÿ”— Source

๐Ÿญ TextView โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ pointFromPos โ€‹

MethodType
pointFromPos(pos: number) => { object: Text or null; offset: number; }

๐Ÿ”— Source

๐Ÿญ NodeView โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ createChildView โ€‹

MethodType
createChildView(yFragment: YXmlElement<{ [key: string]: string; }> or YXmlText, index?: number) => void

๐Ÿ”— Source

โš™๏ธ removeChildView โ€‹

็งป้™คๅญ่Š‚็‚น

MethodType
removeChildView(index: number, size: number) => void

๐Ÿ”— Source

โš™๏ธ getMatrix โ€‹

MethodType
getMatrix(inner?: boolean or undefined) => Matrix

๐Ÿ”— Source

๐Ÿญ State โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ create โ€‹

MethodType
create(data: Doc or Uint8Array or undefined, config: Omit<StateConfig, "doc" or "undoManager">) => State

๐Ÿ”— Source

๐Ÿญ BoardView โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ setTheme โ€‹

MethodType
setTheme(theme: Theme) => void

๐Ÿ”— Source

โš™๏ธ toDataUrl โ€‹

MethodType
toDataUrl(type?: "jpg" or "png" or "webp", quality?: number or undefined) => string or Promise<string>

๐Ÿ”— Source

โš™๏ธ toSvg โ€‹

่ฝฌไธบsvg็š„ๆ–นๆณ•

MethodType
toSvg() => string or Promise<any>

๐Ÿ”— Source

โš™๏ธ destroy โ€‹

MethodType
destroy() => void

๐Ÿ”— Source

โš™๏ธ create โ€‹

MethodType
create(state: State, theme: Theme, options?: ViewOptions or undefined) => BoardView

๐Ÿ”— Source

๐Ÿญ CommandManager โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ registerCommands โ€‹

MethodType
registerCommands(rawCommands: RawCommands) => void

๐Ÿ”— Source

๐Ÿญ Extension โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ create โ€‹

MethodType
create(options: IExtensionOptions, boardOptions: Record<string, any>) => Extension<Record<string, any>, Record<string, any>>

๐Ÿ”— Source

๐Ÿญ ExtensionManager โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ invokeUpdate โ€‹

MethodType
invokeUpdate() => void

๐Ÿ”— Source

โš™๏ธ invokeCreate โ€‹

MethodType
invokeCreate() => void

๐Ÿ”— Source

โš™๏ธ invokeDestroy โ€‹

MethodType
invokeDestroy() => void

๐Ÿ”— Source

โš™๏ธ registerExtension โ€‹

MethodType
registerExtension(extensions: Record<string, IExtensionConfig<any, any>>, defaultOptions: Record<string, any>) => void

๐Ÿ”— Source

๐Ÿญ Board โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ init โ€‹

MethodType
init(data?: string or Doc or Uint8Array or undefined) => void

๐Ÿ”— Source

โš™๏ธ undo โ€‹

MethodType
undo() => void

๐Ÿ”— Source

โš™๏ธ redo โ€‹

MethodType
redo() => void

๐Ÿ”— Source

โš™๏ธ toDataUrl โ€‹

MethodType
toDataUrl(type?: "jpg" or "png" or "webp", quality?: number or undefined) => string or Promise<string>

๐Ÿ”— Source

โš™๏ธ toSvg โ€‹

่ฝฌไธบsvg็š„ๆ–นๆณ•

MethodType
toSvg() => string or Promise<any> or null

๐Ÿ”— Source

โš™๏ธ getData โ€‹

MethodType
getData() => string

๐Ÿ”— Source

โš™๏ธ toString โ€‹

MethodType
toString() => string

๐Ÿ”— Source

โš™๏ธ destroy โ€‹

้”€ๆฏ็š„ๅŠžๆณ•

MethodType
destroy() => void

๐Ÿ”— Source

๐Ÿญ EdgeLine โ€‹

๐Ÿ”— Source

๐Ÿญ LayoutController โ€‹

๐Ÿ”— Source

Methods โ€‹

โš™๏ธ setStructure โ€‹

MethodType
setStructure(structure: string) => void

๐Ÿ”— Source

โš™๏ธ setMargin โ€‹

MethodType
setMargin(margin: IMargin) => void

๐Ÿ”— Source

โš™๏ธ doLayout โ€‹

MethodType
doLayout(nodeView?: NodeView) => void

๐Ÿ”— Source

โš™๏ธ handleMindmapUpdate โ€‹

MethodType
handleMindmapUpdate(e: PropertyEvent) => void

๐Ÿ”— Source

โš™๏ธ destroy โ€‹

MethodType
destroy() => void

๐Ÿ”— Source

๐Ÿน Interfaces โ€‹

โš™๏ธ NodeSpec โ€‹

PropertyTypeDescription
contentstring or undefined
groupstring or undefined
attrs{ [key in keyof K]: IAttrSpec; } or undefined
selectableboolean or undefined
draggableboolean or undefined
toCanvas((node: Node<K>, context: NodeToCanvasContext) => UI) or undefined

โš™๏ธ ISchemaSpec โ€‹

PropertyTypeDescription
nodes{ [key: string]: NodeType<NodeSpec<any>>; }
topNodeTypeNodeType<NodeSpec<any>>

โš™๏ธ StateConfig โ€‹

PropertyTypeDescription
schemaSchema
docDoc
undoManagerUndoManager
pluginsunknown[] or undefined
selectedNode<any>[] or undefined
pluginStateRecord<string, any> or undefined

โš™๏ธ IExtensionConfig โ€‹

PropertyTypeDescription
addCommands((this: Extension<IOptions, IStorage>, extension: Extension<IOptions, IStorage>) => RawCommands) or undefined
addNodes((this: Board<any>) => Record<string, NodeType<NodeSpec<any>>>) or undefined
addOptions((this: Extension<IOptions, IStorage>) => IOptions) or undefined
addStorage((this: Extension<IOptions, IStorage>) => IStorage) or undefined
addKeymap((this: Extension<IOptions, IStorage>) => Record<string, Command>) or undefined
onBeforeCreate((this: Extension<IOptions, IStorage>, board: Board<any>) => void) or undefined
onCreate((this: Extension<IOptions, IStorage>, board: Board<any>) => void) or undefined
onDestroy((this: Extension<IOptions, IStorage>, board: Board<any>) => void) or undefined
onUpdate((this: Extension<IOptions, IStorage>, board: Board<any>) => void) or undefined

โš™๏ธ IEdgeLineData โ€‹

PropertyTypeDescription
fromNodeView
toNodeView
isHorizontalboolean
modeIEdgeLineMode or undefined

๐Ÿธ Types โ€‹

โš™๏ธ NodeToCanvasContext โ€‹

TypeType
NodeToCanvasContext`{
theme: Theme;
render: Leafer;

}` |

๐Ÿ”— Source

โš™๏ธ INodeContent โ€‹

TypeType
INodeContentArray<XmlElement or XmlText or Node> or XmlElement or XmlText or string or null

๐Ÿ”— Source

โš™๏ธ ViewOptions โ€‹

TypeType
ViewOptions`{
width?: number,
height?: number,
debug?: boolean,
container?: any

}` |

๐Ÿ”— Source

โš™๏ธ IExtensionOptions โ€‹

TypeType
IExtensionOptions`IExtensionConfig and {
name: string,
board: Board

}` |

๐Ÿ”— Source

โš™๏ธ Options โ€‹

TypeType
Options`{
data?: string or Uint8Array;
width?: number;
height?: number;
theme?: string;
themeList?: { [key: string]: Theme };
options?: Record<string, any>;
extensions?: Record<string, IExtensionConfig>
container?: any

} and { schema?: Schema; debug?: boolean; }` |

๐Ÿ”— Source

โš™๏ธ IEdgeLineMode โ€‹

TypeType
IEdgeLineMode'curve' or 'direct' or 'corner' or 'bezier'

๐Ÿ”— Source

โš™๏ธ IOptions โ€‹

TypeType
IOptionsNonNullable<unknown>

๐Ÿ”— Source

โš™๏ธ IStorage โ€‹

TypeType
IStorage`{
nodeLayoutControllerMap: WeakMap<NodeView, LayoutController>

}` |

๐Ÿ”— Source