jsmind 0.8.7 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +2 -2
  2. package/es6/jsmind.draggable-node.js +1 -1
  3. package/es6/jsmind.draggable-node.js.map +1 -1
  4. package/es6/jsmind.js +1 -1
  5. package/es6/jsmind.js.map +1 -1
  6. package/es6/jsmind.screenshot.js +1 -1
  7. package/es6/jsmind.screenshot.js.map +1 -1
  8. package/package.json +32 -7
  9. package/types/generated/index.d.ts +8 -0
  10. package/types/generated/jsmind.common.d.ts +66 -0
  11. package/types/generated/jsmind.d.ts +301 -0
  12. package/types/generated/jsmind.data_provider.d.ts +56 -0
  13. package/types/generated/jsmind.dom.d.ts +59 -0
  14. package/types/generated/jsmind.format.d.ts +100 -0
  15. package/types/generated/jsmind.graph.d.ts +180 -0
  16. package/types/generated/jsmind.layout_provider.d.ts +182 -0
  17. package/types/generated/jsmind.mind.d.ts +121 -0
  18. package/types/generated/jsmind.node.d.ts +62 -0
  19. package/types/generated/jsmind.option.d.ts +64 -0
  20. package/types/generated/jsmind.plugin.d.ts +21 -0
  21. package/types/generated/jsmind.shortcut_provider.d.ts +52 -0
  22. package/types/generated/jsmind.util.d.ts +26 -0
  23. package/types/generated/jsmind.view_provider.d.ts +347 -0
  24. package/types/generated/plugins/jsmind.draggable-node.d.ts +229 -0
  25. package/types/generated/plugins/jsmind.screenshot.d.ts +83 -0
  26. package/types/tsconfig.declaration.json +19 -0
  27. package/docs/en/1.usage.md +0 -243
  28. package/docs/en/2.options.md +0 -265
  29. package/docs/en/3.operation.md +0 -156
  30. package/docs/en/4.contribution.md +0 -40
  31. package/docs/en/5.development.md +0 -88
  32. package/docs/en/experimental-features.md +0 -27
  33. package/docs/en/index.md +0 -32
  34. package/docs/en/plugin-screenshot.md +0 -72
  35. package/docs/index.md +0 -19
  36. package/docs/zh/1.usage.md +0 -273
  37. package/docs/zh/2.options.md +0 -270
  38. package/docs/zh/3.operation.md +0 -159
  39. package/docs/zh/4.contribution.md +0 -43
  40. package/docs/zh/5.development.md +0 -81
  41. package/docs/zh/experimental-features.md +0 -27
  42. package/docs/zh/index.md +0 -32
  43. package/docs/zh/plugin-screenshot.md +0 -74
  44. package/example/1_basic.html +0 -77
  45. package/example/1_basic_cn.html +0 -77
  46. package/example/2_features.html +0 -211
  47. package/example/2_features.js +0 -462
  48. package/example/2_features_cn.html +0 -218
  49. package/example/3_requirejs.html +0 -59
  50. package/example/ant.png +0 -0
  51. package/example/data_example.json +0 -95
  52. package/example/demo.html +0 -107
  53. package/js/README.md +0 -7
  54. package/js-legacy/jsmind.draggable-node.js +0 -389
  55. package/js-legacy/jsmind.js +0 -3128
  56. package/js-legacy/jsmind.screenshot.js +0 -351
@@ -1,265 +0,0 @@
1
- [Table of Contents](index.md)
2
-
3
- * [Usage](1.usage.md)
4
- * [Options *](2.options.md)
5
- * [Operation](3.operation.md)
6
- * [Experimental Features](experimental-features.md)
7
- * [Screenshot (Export as Image)](plugin-screenshot.md)
8
- * [Contribution](4.contribution.md)
9
- * [Development Guide](5.development.md)
10
-
11
-
12
- 2.1. Introduction
13
- ===
14
-
15
- The page has been deprecated, and will not be updated any more, please refer to new [Options](options/index.md) page.
16
- ---
17
-
18
- The options object for jsMind was briefly mentioned in the example in the previous chapter:
19
-
20
- ```javascript
21
- var options = {
22
- container:'jsmind_container', // [required] ID of the container
23
- editable:true, // [Optional] Whether to enable editing
24
- theme:'orange' // [optional] theme
25
- };
26
- var jm = new jsMind(options);
27
- ````
28
-
29
- But that's only a small part of it, and the full definition of the options object for jsMind is shown below:
30
-
31
- ```javascript
32
- options = {
33
- container : '', // [required] ID of the container
34
- editable : false, // Is editing enabled?
35
- theme : null, // theme
36
- mode :'full', // display mode
37
- support_html : true, // Does it support HTML elements in the node?
38
- view:{
39
- engine: 'canvas', // engine for drawing lines between nodes in the mindmap
40
- hmargin:100, // Minimum horizontal distance of the mindmap from the outer frame of the container
41
- vmargin:50, // Minimum vertical distance of the mindmap from the outer frame of the container
42
- line_width:2, // thickness of the mindmap line
43
- line_color:'#555', // Thought mindmap line color
44
- line_style:'curved', // line style, straight or curved
45
- custom_line_render: null, // customized line render function
46
- draggable: false, // Drag the mind map with your mouse, when it's larger that the container
47
- hide_scrollbars_when_draggable: false, // Hide container scrollbars, when mind map is larger than container and draggable option is true.
48
- node_overflow: 'hidden' // Text overflow style in node
49
- },
50
- layout:{
51
- hspace:30, // Horizontal spacing between nodes
52
- vspace:20, // Vertical spacing between nodes
53
- pspace:13, // Horizontal spacing between node and connection line (to place node expander)
54
- cousin_space:0 // Additional vertical spacing between child nodes of neighbor nodes
55
- },
56
- shortcut:{
57
- enable:true, // whether to enable shortcut
58
- handles:{}, // Named shortcut key event processor
59
- mapping:{ // shortcut key mapping
60
- addchild : [45, 4096+13], // <Insert>, <Ctrl> + <Enter>
61
- addbrother : 13, // <Enter>
62
- editnode : 113, // <F2>
63
- delnode : 46, // <Delete>
64
- toggle : 32, // <Space>
65
- left : 37, // <Left>
66
- up : 38, // <Up>
67
- right : 39, // <Right>
68
- down : 40, // <Down>
69
- }
70
- },
71
- };
72
- ```
73
-
74
- The above options are the default options for jsMind and you can add the appropriate options to override these default options.
75
-
76
- Except the container, there are all optional.
77
-
78
- These options are described in more detail below.
79
-
80
- 2.2 Conventional Options
81
- ===
82
-
83
- **container** : (string) [required] ID of the container
84
-
85
- > This parameter is not default when instantiating a jsMind. jsMind uses this parameter to find a page element and output a mindmap to that element. For easy control of the size and position of the mind map, use [block element][1] as a container for the mind map, such as `<div>`.
86
-
87
- > You can give the element retouching, but generally limited to setting its size, position, border, etc.; if you want to change the font, font size, background color, foreground color, etc. of the mindmap, it is recommended to add custom themes by way of processing.
88
-
89
- **editable** : (bool) Enable editing or not
90
-
91
- > If this parameter is set to true, you can use the API to do the above operations, otherwise the API will not take effect. By default, the value of this parameter is false .
92
-
93
- > Note that jsMind only provides an editing interface and a small amount of shortcut key support, not full editing functionality, and this parameter is only used to limit the use of these APIs.
94
-
95
- **theme** : (string) subject
96
-
97
- > Specify the theme name of jsMind. (look in jsMind.css)
98
-
99
- **mode** : (string) layout mode
100
-
101
- > When adding a first-level child node to the mind map, jsMind will decide which side to place the node based on this option. 2 layout modes are currently supported:
102
-
103
- > * `full` - child nodes are dynamically distributed on both sides of the root node [default]
104
- > * `side` - child nodes are distributed only to the right of the root node
105
-
106
- > Note that this option only takes effect when adding nodes (`jsMind.add_node(...)`)
107
-
108
- **support_html** : (bool) Does it support HTML elements in nodes?
109
-
110
- > The default value of this parameter is true, meaning that it allows HTML code to be used in the node's header, and you can even insert a table `<table>` in the node's header if you wish. If you want only plain text in the title, set this parameter to false .
111
-
112
- > Note that in freemind, the style of the node is controlled using the HTML language, and it is recommended to set this parameter to true if you are using data in freemind format.
113
-
114
- **log_level** : (string) log level
115
-
116
- > There are 5 levels: `debug`/`info`/`warn`/`error`/`disable`, default level is `info`. if it set to `disable`, all the logs will be closed.
117
-
118
- 2.3 Layout Options
119
- ===
120
-
121
- **view.engine** : (string) engine for drawing lines between nodes in a mindmap
122
-
123
- > jsMind now supports two line drawing engines:
124
-
125
- > * `canvas` - Draw the lines on the canvas [default]
126
- > * `svg` - Using SVG to draw lines, when there are a lot of nodes and a huge area in the mind map, using this mode can bring significant performance improvements
127
-
128
- **view.enable_device_pixel_ratio** : (bool) draw HD mindmap according to the device pixel ratio. (since 0.8.5)
129
-
130
- > This parameter is only used to improve the mindmap resolution when `view.engine=canvas`. It does not need to be set when the engine is `svg`.
131
-
132
- **view.hmargin** : (number) Minimum horizontal distance (in pixels) of the mindmap from the container frame
133
- **view.vmargin** : (number) Minimum vertical distance (in pixels) of the mindmap from the outer container frame
134
-
135
- > These two parameters determine how close the mindmap can be to the border of the container. These two parameters are similar to the margin(css) property of the object if you consider the thought map itself as an object. The default value of them are the width and height of the container.
136
-
137
- **view.line_width** : (number) Thickness of the mindmap line (pixels)
138
- **view.line_color** : (string) color of the mindmap line (color representation in HTML). If `data.leading-line-color` is set on `node`, this option will be overridden.
139
- > By default, the lines are 2px in thickness and dark gray in color (#555).
140
-
141
- **view.line_style** : (string) style of the mindmap line. The available options are:
142
- > * `curved` [default]
143
- > * `straight`
144
-
145
- **view.custom_line_render** : (function) customize the line render function
146
-
147
- > * method signature: `function custom_line_render({ctx, start_point: {x, y}, end_point: {x, y}}):void`
148
- > * `this` presents [current line renderer](https://github.com/hizzgdev/jsmind/blob/master/src/jsmind.graph.js),`ctx` is a canvas context object or a SVG path DOM object, which is determined by `view.engine`, `start_point` and `end_point` are two coordinates object, contains `x` and `y` properties.
149
- > * Note: if you want use [`this`](https://github.com/hizzgdev/jsmind/blob/master/src/jsmind.graph.js) object, you should NOT use Arrow Function expressions.
150
-
151
- **view.draggable** : (bool) Do you want whole mind map draggable inside container?
152
-
153
- > The default value of this parameter is false, as it keep the default behavior with vertical and horizontal scrollbars on the container when mind map is bigger than the container.
154
-
155
- **view.hide_scrollbars_when_draggable** : (bool) Do you want to hide container scrollbars?
156
-
157
- > Rely on draggable option activation, as otherwise it wouldn't be possible to explore the whole mind map when it's bigger than the container.
158
- > The default value of this parameter is false, as it keep the default behavior with vertical and horizontal scrollbars on the container when mind map is bigger than the container.
159
- > Otherwise, if true, there is no more scrollbars, and instead you can drag the mind map with your mouse, while button is down. It should be noted that in this case, the user will not be able to explore the mind map by rolling the mouse wheel.
160
-
161
- **view.node_overflow** : (string) Text overflow style in node (since 0.5.3)
162
-
163
- > 2 styles are currently supported when the node text is too long
164
-
165
- > * `hidden` - Hide part of them to maintain the overall readability of the mind map [default]
166
- > * `wrap` - Wrap the text to display the entire content
167
-
168
- **view.zoom** : (object) zoom setting (since 0.6.3)
169
- > * min - minimum zoom ratio,default 0.5
170
- > * max - maximum zoom ratio, default 2.1
171
- > * step - interval of zoom ratio, default 0.1
172
-
173
- **view.custom_node_render** : (function) custom rendering method for node (since 0.7.6)
174
-
175
- > The option can be used to change the default rendering logic of jsMind. The value of this option is a function, whose signature is `function (jm, element, node): boolean`. Its return value is used to indicate whether the node has been rendered. If it returns `true`, jsMind won't render the node again, otherwise, jsMind will render the node in the default way.
176
-
177
- **view.expander_style** : (string) style of the node expander (since 0.7.8)
178
-
179
- > * `char` - show `-`, `+` in the expander to represent the expanded status [default]
180
- > * `number` - show the count of children node in the expander, when the count of children more than 99, show `...` instead
181
-
182
- **layout.hspace** : horizontal distance (pixels) between (number) nodes
183
- **layout.vspace** : vertical spacing (pixels) between (number) nodes
184
-
185
- > These two parameters are equivalent to the margin(css) property of the node object, which defaults to 30 pixels in the horizontal direction and 20 pixels in the vertical direction.
186
-
187
- **layout.pspace** : (number) size of node expander (pixels)
188
-
189
- > If a node (other than the root node) has a subordinate node, the outside of this node shows the controller for the shrinking/expanding subordinate node, which is used to set the size (width and height) of this controller, the default value is 13 pixels.
190
-
191
- **layout.cousin_space** : (number) additional vertical spacing (pixels) between child nodes of neighbor nodes (since 0.5.5)
192
-
193
- > The default value is 0, which means no additional vertical spacing
194
-
195
- 2.4. Shortcuts
196
- ===
197
-
198
- **shortcut.enable** : (bool) Whether to enable shortcut keys
199
-
200
- > This parameter is used to control whether you can use keyboard shortcuts to edit (or otherwise manipulate) a mindmap in the jsMind interface, the default value is true, i.e. shortcuts are enabled.
201
-
202
- **shortcut.handles** : (object{string : function}) Named shortcut event handler
203
-
204
- > jsMind provides some common event handler for manipulating mindmaps (see next section), and this parameter provides the ability to define additional event handler.
205
- > This parameter is a collection of string->function(jsmind,event), string specifies the name of the event handler, and function is the logic to be executed by the event handler, in the next section of shortcut.mapping configuration, the name of the processor will be bound to the specific keys for the purpose of shortcut operation. For example, the following code defines a processor.
206
-
207
- ```javascript
208
- handles : {
209
- 'dosomething' : function(jm,e){
210
- // do something...
211
- },
212
- 'dosomeotherthing' : function(jm,e){
213
- // do some other things
214
- }
215
- ...
216
- }
217
- ```
218
-
219
- **shortcut.mapping** : (object{string : number | [number]}) Shortcut mapping configuration
220
-
221
- > This parameter is used to configure the correspondence between a specific key and the event handler, this code shows the correspondence by default, e.g. the code for the [Insert] key is 45 and can be used to add a child node, while 112 represents the [F1] key for dosomething.
222
- > Note: You can also bind multiple shortcut keys to an event handler, just use an array.
223
-
224
- ```javascript
225
- mapping:{ // handle mapping.
226
- addchild : [45, 4096+13], // <Insert>, <Ctrl> + <Enter>
227
- addbrother : 13, // <Enter>
228
- editnode : 113, // <F2>
229
- delnode : 46, // <Delete>
230
- toggle : 32, // <Space>
231
- left : 37, // <Left>
232
- up : 38, // <Up>
233
- right : 39, // <Right>
234
- down : 40, // <Down>
235
-
236
- // Examples
237
- dosomething: 112, // <F1>
238
- }
239
- ```
240
-
241
- > In addition to the single-key scenario described above, jsMind has added support for combination keys, where the code of the combination shortcut is the code of the regular key plus the identification code of the function key.
242
- > Four function keys are currently supported, and the corresponding identification codes are.
243
-
244
- > * Meta : 8192
245
- > * Ctrl : 4096
246
- > * ALT : 2048
247
- > * SHIFT : 1024
248
-
249
- > The following are some examples.
250
-
251
- ```javascript
252
- mapping:{
253
- addchild : 4096 + 73, // <Ctrl> + <I>
254
- delnode : 4096 + 2048 + 68, // <Ctrl> + <ALT> + <D>
255
- }
256
- ```
257
-
258
- copyright notice
259
- ===
260
-
261
- Reproduction and deduction are prohibited.
262
-
263
- The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
264
-
265
- [1]:http://www.nowamagic.net/librarys/veda/detail/1190 "CSS Block Level Element, Inline Element Concept"
@@ -1,156 +0,0 @@
1
- [Table of Contents](index.md)
2
-
3
- * [Usage](1.usage.md)
4
- * [Options](2.options.md)
5
- * [Operation *](3.operation.md)
6
- * [Experimental Features](experimental-features.md)
7
- * [Screenshot (Export as Image)](plugin-screenshot.md)
8
- * [Contribution](4.contribution.md)
9
- * [Development Guide](5.development.md)
10
-
11
-
12
- jsMind object
13
- ===
14
-
15
- jsMind provides a set of APIs for manipulating the mindmap, all of which are based on the `jsMind` object processing, which can be obtained using the following code.
16
-
17
- ```javascript
18
- /*
19
- Method 1.
20
- jsMind objects are available when you create a mindmap
21
- */
22
- var jm = new jsMind(options);
23
-
24
- /*
25
- Method 2.
26
- This jsMind object can be obtained directly if a mindmap already exists on the current page
27
- When multiple jsMind are created on a page, this method gets the last object created
28
- */
29
- var jm = jsMind.current;
30
- ```
31
-
32
- Node object
33
- ===
34
-
35
- A mindmap diagram is composed of multiple nodes and connections between nodes, a mindmap diagram has a root node, the root node can have multiple child nodes on the periphery, and the child node can have multiple child nodes. Each node contains more than one of the following attributes.
36
-
37
- ```javascript
38
- node {
39
- id, // : string node id
40
- index, // : integer node number
41
- topic, // : string node topic
42
- isroot, // : boolean indicates whether this node is root or not
43
- parent, // : node The parent of this node, the parent program of the root node is null, but please do not judge whether this node is the root node based on this property.
44
- direction, // : enum(left,center,right) The distribution position of the node
45
- children, // : array of node The combination of children of the node
46
- expanded, // : boolean Is the next level of the node expanded or not
47
- data, // : object{string: object} Other additional data for this node
48
- }
49
- ```
50
-
51
- 3.1 Displaying a mindmap
52
- ===
53
-
54
- Use the `jm.show(mind)` method to display a mindmap, see [1.1. Basic framework](1.usage.md) for specific usage.
55
-
56
- 3.2. Finding Nodes
57
- ===
58
-
59
- **Get root** : Use `jm.get_root()` to get the root of the current mindmap.
60
-
61
- **Find node by id** : Use the `jm.get_node(node_id)` method to find the node specified in the current mind map by id, and return `null` if it is not found.
62
-
63
- **Get selected node** : Use `jm.get_selected_node()` to get the currently selected node and return `null` if there is no selected node.
64
-
65
- **Find adjacent nodes** : Use `jm.find_node_before(node|node_id)` and `find_node_after(node|node_id)` to get the previous or next node of the specified node, and return `null` if there is no previous or next one.
66
-
67
- **Fetch parent** : Use `node.parent` to get the parent node, the parent of the root node is `null`.
68
-
69
- **Fetching a collection of child nodes** : A collection of child nodes can be obtained using `node.children`.
70
-
71
- 3.3 Operation on Nodes
72
- ===
73
-
74
- **Select node** : Use the `jm.select_node(node)` method to select the specified node.
75
- - `node`: it is the target node to be selected, the parameter value can be either a `node` object or the id of the `node`;
76
-
77
- **Collapse child nodes** : Use the `jm.collapse_node(node)` method to collapse the child nodes of the node.
78
- - `node`: it is the target node to be collapsed, the parameter value can be either a `node` object or the id of the `node`;
79
-
80
- **Expand Child Node** : Use the `jm.expand_node(node)` method to expand the child node of this node.
81
- - `node`: it is the target node to be expanded, the parameter value can be either a `node` object or the id of the `node`;
82
-
83
- **Collapse or expand child nodes** : Use the `jm.toggle_node(node)` method to automatically expand or collapse child nodes.
84
- - `node`: it is the target node to be collapsed or expanded, the parameter value can be either a `node` object or the id of the `node`;
85
-
86
- **Expand all child nodes** : All child nodes can be expanded using the `jm.expand_all()` method.
87
-
88
- **Expand to level** : Use the `jm.expand_to_depth(depth)` method to expand to a specified level.
89
-
90
- **Move Node** : Use the `jm.move_node(node, before_id, parent_id, direction)` method to move a node
91
- - `node`: it is the target node to be moved, the parameter value can be either a `node` object or the id of the `node`;
92
- - `before_id`: it is the id of the destined node, the target node will be moved before the destined node. In addition, 2 values can be used for the parameter:
93
- - `_first_` the target node will be moved to the first place of all sibling nodes
94
- - `_last_` the target node will be moved to the last place of all sibling nodes
95
- - `parent_id`: [Optional] it is the id of the parent node of the destined node. If the parameter is not provided, the id of the parent node of the `before` node will be taken.
96
- - `direction`: [Optional] it is used for moving the level-2 nodes(the direct children of the root node). the node can be moved to the left side or right side. If the node being moved is not a level-2 node, this parameter has no effect; If this parameter is not provided, the direction will be automatically determined. Only 2 values are valid for the parameter:
97
- - `left`
98
- - `right`
99
-
100
- **center node** : Use the `jm.scroll_node_to_center(node)` method to scroll a node to the center of mindmap. (since 0.6.2)
101
-
102
- **Enable editing** : Use the `jm.enable_edit()` method to enable editing of the current mindmap.
103
-
104
- **Disable_edit** : Use the `jm.disable_edit()` method to disable editing of the current mindmap.
105
-
106
- **Edit Node** : The node can be adjusted to edit using the `jm.begin_edit(node|node_id)` method.
107
- - `node`: it is the target node to be edited, the parameter value can be either a `node` object or the id of the `node`;
108
-
109
- **Stop editing** : The node can be adjusted to read-only using the `jm.end_edit()` method.
110
-
111
-
112
- 3.4. Editing Nodes
113
- ===
114
-
115
- **Add Node** : Use the `jm.add_node(parent_node, node_id, topic, data, direction)` method to add a sub node to the `parent_node`. `data` and `direction` are optional.
116
-
117
- **Insert node before specified location** : Use the `jm.insert_node_before(node_before, node_id, topic, data, direction)` method to insert a node before the `node_before` node. `data` and `direction` are optional.
118
-
119
- **Insert node after specified location** : Use the `jm.insert_node_after(node_after, node_id, topic, data, direction)` method to insert a node after the `node_after` node. `data` and `direction` are optional.
120
-
121
- **Delete Node** : Use the `jm.remove_node(node|node_id)` method to delete a specified node and all its children.
122
-
123
- **Update node** : Use the `jm.update_node(node_id, topic)` method to update the topic of the specified node.
124
-
125
-
126
- 3.5 Setting Style
127
- ===
128
-
129
- **Set the theme** : Use the `jm.set_theme(theme)` method to set the theme of the mind map.
130
-
131
- **Set background / foreground color** : Use the `jm.set_node_color(node_id, bg_color, fg_color)` method to set the background and foreground color of the specified node.
132
-
133
- **Set Font** : Use the `jm.set_node_font_style(node_id, size, weight, style)` method to set the font of the specified node.
134
-
135
- **Set background image** : Use the `jm.set_node_background_image(node_id, image, width, height)` method to set the background image of the specified node.
136
-
137
- 3.6 Access to Data
138
- ===
139
-
140
- **Get metadata** : Use the `jm.get_meta()` method to get metadata for the current mindmap.
141
-
142
- **Get Data** : Use the `jm.get_data(data_format)` method to get the data text in the specified format of the current mindmap.
143
-
144
- 3.7 Other Operations
145
- ===
146
-
147
- **Clear selection of nodes** : Use the `jm.select_clear()` method to clear the current selected state.
148
-
149
- **Determine if the node is visible** : Use the `jm.is_node_visible(node)` method to determine if this node is visible.
150
-
151
- copyright notice
152
- ===
153
-
154
- Reproduction and deduction are prohibited.
155
-
156
- The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
@@ -1,40 +0,0 @@
1
- [Table of Contents](index.md)
2
-
3
- * [Usage](1.usage.md)
4
- * [Options](2.options.md)
5
- * [Operation](3.operation.md)
6
- * [Experimental Features](experimental-features.md)
7
- * [Screenshot (Export as Image)](plugin-screenshot.md)
8
- * [Contribution *](4.contribution.md)
9
- * [Development Guide](5.development.md)
10
-
11
- Contribution code
12
- ===
13
-
14
- jsMind still has a lot of room for improvement and optimization. You are welcome to contribute code to jsMind.
15
-
16
- The most convenient way to contribute code is to submit a pull-request to the jsMind project, which can be done in the github help documentation.
17
-
18
- * [Creating a pull request from a fork](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork)
19
- * [Working with forks](https://help.github.com/en/articles/working-with-forks)
20
-
21
- Before submitting a pull-request, be sure to test it well and make a detailed note when submitting the pull-request, including feature descriptions, code change notes.
22
-
23
- Ask questions or contribute ideas
24
- ===
25
-
26
- Or you can bring up a problem or need you've encountered via an issue for discussion, and hopefully a friend who has the ability and energy to join in and solve the problem together.
27
-
28
- For common requirements, it is recommended to implement post-implementation feedback to the open source project, for non-common requirements, you can fork out a separate warehouse for custom development.
29
-
30
- Customization
31
- ===
32
-
33
- JsMind is an open source library with the BSD license, and can be used in commercial production. If there is a need for customization, please contact the author or other developers you trust.
34
-
35
- copyright notice
36
- ===
37
-
38
- Reproduction and deduction are prohibited.
39
-
40
- The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
@@ -1,88 +0,0 @@
1
- [Table of Contents](index.md)
2
-
3
- * [Usage](1.usage.md)
4
- * [Options](2.options.md)
5
- * [Operation](3.operation.md)
6
- * [Experimental Features](experimental-features.md)
7
- * [Screenshot (Export as Image)](plugin-screenshot.md)
8
- * [Contribution](4.contribution.md)
9
- * [Development Guide *](5.development.md)
10
-
11
-
12
- > First of all, I would like to express my gratitude to you. The open source community is thriving because of you, and jsMind has gained even greater value because of you.
13
-
14
- Contributing process
15
- ===
16
-
17
- The basic process of contributing code to jsMind is:
18
-
19
- 1. fork jsmind
20
- 2. Develop new features or improve the current version
21
- 3. Test your code
22
- 4. Submit a pull-request to jsmind
23
- 5. Waiting for review, you may be asked to modify your code during the review
24
- 6. Merge your pull-request
25
-
26
- Preparation
27
- ===
28
-
29
- **Pull-Request and Fork** : read the github [article of pull-request](https://docs.github.com/cn/pull-requests) to learn how to submit your code using fork and pull-request.
30
-
31
- **Node.js** : Node.js is not required to use jsMind in your project, but it is used to perform unit test, code formatting, packaging and compression. Node.js 18.x is used by CI environment of jsMind.
32
-
33
- **Visual Studio Code** : If your IDE is VS Code, it's recommended to install the plugin `esbenp.prettier-vscode`. In this way, your code will be formatted according to the configuration of jsMind automatically.
34
-
35
- Development
36
- ===
37
-
38
- jsMind is written in ES6 format, source code is in `/src`. Generally, only the code in it needs to be modified.
39
-
40
- Please remember to format the code at any time during the development process. Execute the following code on the command line to format the code:
41
-
42
- ```
43
- npm run format
44
- ```
45
-
46
- Unit Test
47
- ===
48
-
49
- The code of unit test is in `/tests/unit`. Please add unit test for the code changes, and make sure all unit tests pass.
50
-
51
- Execute the following command to run the unit tests:
52
-
53
- ```
54
- npm run test-es6
55
- ```
56
-
57
- Packaging and compression
58
- ===
59
-
60
- Execute the following command to package the code into a js file that can work in web browsers:
61
-
62
- ```
63
- npm run build
64
- ```
65
-
66
- The js file will be generated into `/es6`
67
-
68
- Local running and debugging
69
- ===
70
- Execute the following command to start a simple http server
71
-
72
- ```
73
- npm run server
74
- ```
75
-
76
- The accessible url will be printed in the command line window, which probably be `http://localhost:8080`. Now visit http://localhost:8080/example/2_features_es6.html and test or debug.
77
-
78
- it is strongly recommended to test all the use cases on the page, no matter you are developing a new feature or fixing a bug.
79
-
80
- It should be noted: If the ES6 files is changed, you may have to run `npm run build` and refresh the page to preview the changes.
81
-
82
-
83
- copyright
84
- ===
85
-
86
- Reproduction and deduction are prohibited.
87
-
88
- The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
@@ -1,27 +0,0 @@
1
- [Table of Contents](index.md)
2
-
3
- * [Usage](1.usage.md)
4
- * [Options](2.options.md)
5
- * [Operation](3.operation.md)
6
- * [Experimental Features *](experimental-features.md)
7
- * [Screenshot (Export as Image)](plugin-screenshot.md)
8
- * [Contribution](4.contribution.md)
9
- * [Development Guide](5.development.md)
10
-
11
- Experimental Features
12
- ===
13
-
14
- Some contents in the documents are annotated with `experimental`, indicating that those features are currently in experimental stage, which means those features may be changed in the future. The experimental features are neither guaranteed to continue to exist in subsequent versions, nor guaranteed their backward compatibility. If any experimental feature is used in your project, you'd better test them carefully when you upgrade jsmind in the future.
15
-
16
-
17
- List of Experimental Features:
18
-
19
- - [Screenshot (Export as Image)](plugin-screenshot.md)
20
-
21
-
22
- copyright notice
23
- ===
24
-
25
- Reproduction and deduction are prohibited.
26
-
27
- The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
package/docs/en/index.md DELETED
@@ -1,32 +0,0 @@
1
- Table of Contents
2
- ======
3
-
4
- * [Usage](1.usage.md)
5
- * Basic Framework
6
- * Data Format
7
- * Themes
8
- * Styles
9
- * [Options](2.options.md)
10
- * Introduction
11
- * Conventional Options
12
- * Layout Options
13
- * Shortcuts
14
- * [API / Operation](3.operation.md)
15
- * Rendering a Mindmap
16
- * Finding Nodes
17
- * Operation on Nodes
18
- * Editing Nodes
19
- * Setting Style
20
- * Access to Data
21
- * Other Operations
22
- * [Experimental Features](experimental-features.md)
23
- * [Screenshot (Export as Image)](plugin-screenshot.md)
24
- * [Contribution](4.contribution.md)
25
- * [Development Guide](5.development.md)
26
-
27
- copyright notice
28
- ======
29
-
30
- Reproduction and deduction are prohibited.
31
-
32
- The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.