0.0.4 • Published 17 days ago

mindmap-editor v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

mindmap-tree demo

Demo

Demo

Feature

  • Add & Delete Node
  • Edit Node Text
  • Undo & Redo
  • Change Scale
  • Drag Node to change Father
  • Keyboard operation
  • Multi select
  • Expand & Shrink Node

Get Started

Installation

npm install -S mindmap-tree

Usage

<body>
  <div id="container" style="width:100vh;height:100vh;"></div>
</body>
import MindmapTree from 'mindmap-tree';
import 'mindmap-tree/style.css';

new MindmapTree({
  container: '#container',
});

Params

MindmapTree constructor options:

PropTypeDefaultDescription
containerString | Element''HTML element of container
dataNodeDataMapRecord<string, NodeData>Initial data of mindmap
isDebugBooleanfalseIs debug or not

NodeData params:

PropTypeDefaultDescription
labelString''Node label
directionNumber0Node direction, 1:right, 0:none, -1:left
isRootBooleanfalseIs root node or not
childrenString[][]children ids
isExpandBooleantrueTo expand node or not

License

MIT

Copyright (c) 2023 - present, RockyRen

0.0.3

17 days ago

0.0.4

17 days ago

0.0.2

20 days ago

0.0.1

1 month ago