Skip to content

Commit 68369c2

Browse files
committed
clean
1 parent e8f6cf0 commit 68369c2

File tree

3 files changed

+48
-44
lines changed

3 files changed

+48
-44
lines changed

LICENSE

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
MIT License
22

3-
Copyright (c) 2017 Angelo Gazzola
3+
Copyright (c) 2017 Angelo Gazzola (nglgzz.com)
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
611

7-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
814

9-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md renamed to readme.md

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,39 @@
1-
[![NPM](https://nodei.co/npm/react-mindmap.png)](https://npmjs.org/package/react-mindmap)
2-
31
# React Mindmap [UNMAINTAINED]
4-
**This project is no longer maintained. The component is still usable, but if you find any problem or if you want to improve it, you're welcome to submit a PR.**
5-
6-
A React component for [MindNode](https://mindnode.com/) maps (or other mindmaps).
72

3+
> React component for [MindNode](https://mindnode.com/) maps (or other mindmaps)
84
9-
## Installation
5+
**This project is no longer maintained. The component is still usable, but if you find any problem or if you want to improve it, you're welcome to submit a PR.**
106

11-
npm install react-mindmap --save
7+
## Install
128

9+
`npm install react-mindmap --save`
1310

1411
## Usage
1512

1613
```js
17-
import { Component } from 'react';
18-
import { render } from 'react-dom';
19-
import MindMap from 'react-mindmap';
20-
import { nodes, connections } from './my-map.json';
14+
import { Component } from "react";
15+
import { render } from "react-dom";
16+
import MindMap from "react-mindmap";
17+
import { nodes, connections } from "./my-map.json";
2118

2219
class Example extends Component {
2320
render() {
2421
return (
25-
<MindMap
26-
nodes={this.props.nodes}
27-
connections={this.props.connections}
28-
/>
22+
<MindMap nodes={this.props.nodes} connections={this.props.connections} />
2923
);
3024
}
3125
}
3226

3327
render(
3428
<Example nodes={nodes} connections={connections} />,
35-
document.getElementById('target')
29+
document.getElementById("target")
3630
);
3731
```
3832

3933
![img](https://raw.githubusercontent.com/learn-anything/react-mindmap/master/screenshot.png)
4034

41-
4235
## Testing
36+
4337
To test this repository run these commands
4438

4539
```
@@ -50,25 +44,26 @@ npm install && npm run test
5044

5145
and connect to http://localhost:3000/
5246

53-
5447
## Parser
48+
5549
This repo also has a parser that automates the conversion of JSON maps from MindNode
5650
to the format used by this component. To use it run:
5751

5852
```
5953
npm run parse path/to/mindnode/maps path/to/converted/maps
6054
```
6155

62-
6356
## Props
64-
| Prop | Type | Default | Description |
65-
|-----------------|:-------:|---------|--------------------------------------------------------|
66-
| **nodes** | Array | [] | Array of objects used to render nodes. |
67-
| **connections** | Array | [] | Array of objects used to render connections. |
68-
| **subnodes** | Array | [] | Array of objects used to render subnodes. |
57+
58+
| Prop | Type | Default | Description |
59+
| --------------- | :-----: | ------- | ------------------------------------------------------ |
60+
| **nodes** | Array | [] | Array of objects used to render nodes. |
61+
| **connections** | Array | [] | Array of objects used to render connections. |
62+
| **subnodes** | Array | [] | Array of objects used to render subnodes. |
6963
| **editable** | Boolean | false | Enable editor mode, which allows to move around nodes. |
7064

7165
### nodes
66+
7267
Array of objects used to render nodes. Below an example of the node structure.
7368

7469
```json
@@ -91,6 +86,7 @@ The possible attributes are:
9186
- **note**: note that will be visible on hover
9287

9388
### connections
89+
9490
Array of objects used to render connections. Below an example of the connection
9591
structure.
9692

@@ -110,17 +106,18 @@ The possible attributes are:
110106
- **source**: title of the node where the connection starts
111107
- **target**: title of the node where the connection ends
112108
- **curve.x** and **curve.y**: coordinates of the control point of a quadratic bezier curve
113-
(if not specified the connection will be straight)
109+
(if not specified the connection will be straight)
114110

115111
### subnodes
112+
116113
Array of objects used to render subnodes. The structure is the same as for nodes
117114
with two additional attributes:
118115

119116
- **parent**: title of the parent node
120117
- **color**: used for the margin color, needs to be a valid CSS color
121118

122-
123119
## Styling
120+
124121
Here's a list of all CSS classes for styling:
125122

126123
- **.mindmap-svg**: main `svg` element containing the map;
@@ -130,8 +127,3 @@ Here's a list of all CSS classes for styling:
130127
- **.mindmap-subnode-text**: `div` element containing a subnode;
131128
- **.mindmap-connection**: `path` element for each connection;
132129
- **.mindmap-emoji**: `img` tag for emoji
133-
134-
135-
## Contributing
136-
If you want a new feature added, you find bugs or you want to help making some changes,
137-
feel free to open an issue or submit a pull request. Any help would be greatly appreciated :heart:

test/react-mindmap.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ process.umask = function () {
277277
* Copyright (c) 2013-present, Facebook, Inc.
278278
*
279279
* This source code is licensed under the MIT license found in the
280-
* LICENSE file in the root directory of this source tree.
280+
* license file in the root directory of this source tree.
281281
*
282282
*
283283
*/
@@ -317,7 +317,7 @@ module.exports = emptyFunction;
317317
* Copyright (c) 2013-present, Facebook, Inc.
318318
*
319319
* This source code is licensed under the MIT license found in the
320-
* LICENSE file in the root directory of this source tree.
320+
* license file in the root directory of this source tree.
321321
*
322322
*/
323323

@@ -377,7 +377,7 @@ module.exports = invariant;
377377
* Copyright (c) 2013-present, Facebook, Inc.
378378
*
379379
* This source code is licensed under the MIT license found in the
380-
* LICENSE file in the root directory of this source tree.
380+
* license file in the root directory of this source tree.
381381
*/
382382

383383

@@ -395,7 +395,7 @@ module.exports = ReactPropTypesSecret;
395395
* Copyright (c) 2014-present, Facebook, Inc.
396396
*
397397
* This source code is licensed under the MIT license found in the
398-
* LICENSE file in the root directory of this source tree.
398+
* license file in the root directory of this source tree.
399399
*
400400
*/
401401

@@ -3431,7 +3431,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
34313431
* Copyright (c) 2013-present, Facebook, Inc.
34323432
*
34333433
* This source code is licensed under the MIT license found in the
3434-
* LICENSE file in the root directory of this source tree.
3434+
* license file in the root directory of this source tree.
34353435
*/
34363436

34373437
if (process.env.NODE_ENV !== 'production') {
@@ -3461,7 +3461,7 @@ if (process.env.NODE_ENV !== 'production') {
34613461
* Copyright (c) 2013-present, Facebook, Inc.
34623462
*
34633463
* This source code is licensed under the MIT license found in the
3464-
* LICENSE file in the root directory of this source tree.
3464+
* license file in the root directory of this source tree.
34653465
*/
34663466

34673467

@@ -4082,7 +4082,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
40824082
* Copyright (c) 2013-present, Facebook, Inc.
40834083
*
40844084
* This source code is licensed under the MIT license found in the
4085-
* LICENSE file in the root directory of this source tree.
4085+
* license file in the root directory of this source tree.
40864086
*/
40874087

40884088

@@ -4150,7 +4150,7 @@ module.exports = checkPropTypes;
41504150
* Copyright (c) 2013-present, Facebook, Inc.
41514151
*
41524152
* This source code is licensed under the MIT license found in the
4153-
* LICENSE file in the root directory of this source tree.
4153+
* license file in the root directory of this source tree.
41544154
*/
41554155

41564156

@@ -4985,4 +4985,4 @@ module.exports = function (css) {
49854985

49864986
/***/ })
49874987
/******/ ]);
4988-
});
4988+
});

0 commit comments

Comments
 (0)