0.0.5-alpha.2 • Published 1 year ago

mindmap-editor v0.0.5-alpha.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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.5-alpha.2

1 year ago

0.0.5-alpha.1

1 year ago

0.0.5

1 year ago

0.0.3

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago