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.
- package/README.md +2 -2
- package/es6/jsmind.draggable-node.js +1 -1
- package/es6/jsmind.draggable-node.js.map +1 -1
- package/es6/jsmind.js +1 -1
- package/es6/jsmind.js.map +1 -1
- package/es6/jsmind.screenshot.js +1 -1
- package/es6/jsmind.screenshot.js.map +1 -1
- package/package.json +32 -7
- package/types/generated/index.d.ts +8 -0
- package/types/generated/jsmind.common.d.ts +66 -0
- package/types/generated/jsmind.d.ts +301 -0
- package/types/generated/jsmind.data_provider.d.ts +56 -0
- package/types/generated/jsmind.dom.d.ts +59 -0
- package/types/generated/jsmind.format.d.ts +100 -0
- package/types/generated/jsmind.graph.d.ts +180 -0
- package/types/generated/jsmind.layout_provider.d.ts +182 -0
- package/types/generated/jsmind.mind.d.ts +121 -0
- package/types/generated/jsmind.node.d.ts +62 -0
- package/types/generated/jsmind.option.d.ts +64 -0
- package/types/generated/jsmind.plugin.d.ts +21 -0
- package/types/generated/jsmind.shortcut_provider.d.ts +52 -0
- package/types/generated/jsmind.util.d.ts +26 -0
- package/types/generated/jsmind.view_provider.d.ts +347 -0
- package/types/generated/plugins/jsmind.draggable-node.d.ts +229 -0
- package/types/generated/plugins/jsmind.screenshot.d.ts +83 -0
- package/types/tsconfig.declaration.json +19 -0
- package/docs/en/1.usage.md +0 -243
- package/docs/en/2.options.md +0 -265
- package/docs/en/3.operation.md +0 -156
- package/docs/en/4.contribution.md +0 -40
- package/docs/en/5.development.md +0 -88
- package/docs/en/experimental-features.md +0 -27
- package/docs/en/index.md +0 -32
- package/docs/en/plugin-screenshot.md +0 -72
- package/docs/index.md +0 -19
- package/docs/zh/1.usage.md +0 -273
- package/docs/zh/2.options.md +0 -270
- package/docs/zh/3.operation.md +0 -159
- package/docs/zh/4.contribution.md +0 -43
- package/docs/zh/5.development.md +0 -81
- package/docs/zh/experimental-features.md +0 -27
- package/docs/zh/index.md +0 -32
- package/docs/zh/plugin-screenshot.md +0 -74
- package/example/1_basic.html +0 -77
- package/example/1_basic_cn.html +0 -77
- package/example/2_features.html +0 -211
- package/example/2_features.js +0 -462
- package/example/2_features_cn.html +0 -218
- package/example/3_requirejs.html +0 -59
- package/example/ant.png +0 -0
- package/example/data_example.json +0 -95
- package/example/demo.html +0 -107
- package/js/README.md +0 -7
- package/js-legacy/jsmind.draggable-node.js +0 -389
- package/js-legacy/jsmind.js +0 -3128
- package/js-legacy/jsmind.screenshot.js +0 -351
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>jsMind</title>
|
|
7
|
-
<link
|
|
8
|
-
type="text/css"
|
|
9
|
-
rel="stylesheet"
|
|
10
|
-
href="//jsd.onmicrosoft.cn/npm/jsmind@0.8.7/style/jsmind.css"
|
|
11
|
-
/>
|
|
12
|
-
<style type="text/css">
|
|
13
|
-
li {
|
|
14
|
-
margin-top: 2px;
|
|
15
|
-
margin-bottom: 2px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
button {
|
|
19
|
-
width: 140px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
select {
|
|
23
|
-
width: 140px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#layout {
|
|
27
|
-
width: 1230px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
#jsmind_nav {
|
|
31
|
-
width: 210px;
|
|
32
|
-
height: 600px;
|
|
33
|
-
border: solid 1px #ccc;
|
|
34
|
-
overflow: auto;
|
|
35
|
-
float: left;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.file_input {
|
|
39
|
-
width: 100px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
button.sub {
|
|
43
|
-
width: 100px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#jsmind_container {
|
|
47
|
-
float: left;
|
|
48
|
-
width: 1000px;
|
|
49
|
-
height: 600px;
|
|
50
|
-
border: solid 1px #ccc;
|
|
51
|
-
background: #f4f4f4;
|
|
52
|
-
}
|
|
53
|
-
</style>
|
|
54
|
-
</head>
|
|
55
|
-
|
|
56
|
-
<body>
|
|
57
|
-
<div id="layout">
|
|
58
|
-
<div id="jsmind_nav">
|
|
59
|
-
<div>1. Open</div>
|
|
60
|
-
<ol type="A">
|
|
61
|
-
<li><button onclick="open_json();">open example</button></li>
|
|
62
|
-
<li><button onclick="open_remote();">open remote</button></li>
|
|
63
|
-
<li>
|
|
64
|
-
<button onclick="prompt_info('see 6.Multi Format');">
|
|
65
|
-
open local file
|
|
66
|
-
</button>
|
|
67
|
-
</li>
|
|
68
|
-
<li>
|
|
69
|
-
<button onclick="prompt_info('see 6.Multi Format');">
|
|
70
|
-
save local file
|
|
71
|
-
</button>
|
|
72
|
-
</li>
|
|
73
|
-
<li><button onclick="screen_shot();">screenshot</button></li>
|
|
74
|
-
</ol>
|
|
75
|
-
<div>2. Select & Toggle</div>
|
|
76
|
-
<ol type="A">
|
|
77
|
-
<li><button onclick="select_node();">select a node</button></li>
|
|
78
|
-
<li>
|
|
79
|
-
<button onclick="prompt_info('please try click a node');">
|
|
80
|
-
try click a node
|
|
81
|
-
</button>
|
|
82
|
-
</li>
|
|
83
|
-
<li><button onclick="show_selected();">get the selected</button></li>
|
|
84
|
-
</ol>
|
|
85
|
-
<div>3. Edit</div>
|
|
86
|
-
<ol type="A">
|
|
87
|
-
<li><button onclick="toggle_editable(this);">disable editable</button></li>
|
|
88
|
-
<li><button onclick="add_node();">add a node</button></li>
|
|
89
|
-
<li><button onclick="add_image_node();">add a image node</button></li>
|
|
90
|
-
<li><button onclick="modify_node();">modify node</button></li>
|
|
91
|
-
<li>
|
|
92
|
-
<button onclick="prompt_info('please try double click a node');">
|
|
93
|
-
try double click
|
|
94
|
-
</button>
|
|
95
|
-
</li>
|
|
96
|
-
<li><button onclick="move_node();">move a node</button></li>
|
|
97
|
-
<li><button onclick="move_to_first();">move to first</button></li>
|
|
98
|
-
<li><button onclick="move_to_last();">move to last</button></li>
|
|
99
|
-
<li><button onclick="remove_node();">remove node</button></li>
|
|
100
|
-
</ol>
|
|
101
|
-
<div>4. Style</div>
|
|
102
|
-
<ol type="A">
|
|
103
|
-
<li><button onclick="change_text_font();">change font</button></li>
|
|
104
|
-
<li><button onclick="change_text_color();">change color</button></li>
|
|
105
|
-
<li><button onclick="change_background_color();">change bg-color</button></li>
|
|
106
|
-
<li><button onclick="change_background_image();">change background</button></li>
|
|
107
|
-
</ol>
|
|
108
|
-
<div>5. Theme</div>
|
|
109
|
-
<ol type="A">
|
|
110
|
-
<li>
|
|
111
|
-
<select onchange="set_theme(this.value);">
|
|
112
|
-
<option value="">default</option>
|
|
113
|
-
<option value="primary">primary</option>
|
|
114
|
-
<option value="warning">warning</option>
|
|
115
|
-
<option value="danger">danger</option>
|
|
116
|
-
<option value="success">success</option>
|
|
117
|
-
<option value="info">info</option>
|
|
118
|
-
<option value="greensea" selected="selected">greensea</option>
|
|
119
|
-
<option value="nephrite">nephrite</option>
|
|
120
|
-
<option value="belizehole">belizehole</option>
|
|
121
|
-
<option value="wisteria">wisteria</option>
|
|
122
|
-
<option value="asphalt">asphalt</option>
|
|
123
|
-
<option value="orange">orange</option>
|
|
124
|
-
<option value="pumpkin">pumpkin</option>
|
|
125
|
-
<option value="pomegranate">pomegranate</option>
|
|
126
|
-
<option value="clouds">clouds</option>
|
|
127
|
-
<option value="asbestos">asbestos</option>
|
|
128
|
-
</select>
|
|
129
|
-
</li>
|
|
130
|
-
</ol>
|
|
131
|
-
<div>6. Adjusting</div>
|
|
132
|
-
<ol type="A">
|
|
133
|
-
<li>
|
|
134
|
-
<button onclick="change_container();">resize container</button>
|
|
135
|
-
<button onclick="resize_jsmind();">adusting</button>
|
|
136
|
-
</li>
|
|
137
|
-
<li>expand/collapse</li>
|
|
138
|
-
<ol>
|
|
139
|
-
<li><button class="sub" onclick="expand();">expand node</button></li>
|
|
140
|
-
<li><button class="sub" onclick="collapse();">collapse node</button></li>
|
|
141
|
-
<li><button class="sub" onclick="toggle();">toggle node</button></li>
|
|
142
|
-
<li>
|
|
143
|
-
<button class="sub" onclick="expand_to_level2();">
|
|
144
|
-
expand to level 2
|
|
145
|
-
</button>
|
|
146
|
-
</li>
|
|
147
|
-
<li>
|
|
148
|
-
<button class="sub" onclick="expand_to_level3();">
|
|
149
|
-
expand to level 3
|
|
150
|
-
</button>
|
|
151
|
-
</li>
|
|
152
|
-
<li><button class="sub" onclick="expand_all();">expand all</button></li>
|
|
153
|
-
<li><button class="sub" onclick="collapse_all();">collapse all</button></li>
|
|
154
|
-
</ol>
|
|
155
|
-
<li>zoom(ctrl+mousewheel)</li>
|
|
156
|
-
<button id="zoom-in-button" style="width: 50px" onclick="zoomIn();">In</button>
|
|
157
|
-
<button id="zoom-out-button" style="width: 50px" onclick="zoomOut();">
|
|
158
|
-
Out
|
|
159
|
-
</button>
|
|
160
|
-
</ol>
|
|
161
|
-
|
|
162
|
-
<div>7. Multi Format</div>
|
|
163
|
-
<ol type="A">
|
|
164
|
-
<li>node_tree(default)</li>
|
|
165
|
-
<ol>
|
|
166
|
-
<li><button class="sub" onclick="show_data();">show data</button></li>
|
|
167
|
-
<li><button class="sub" onclick="save_file();">save file</button></li>
|
|
168
|
-
<li><input id="file_input" class="file_input" type="file" /></li>
|
|
169
|
-
<li><button class="sub" onclick="open_file();">open file</button></li>
|
|
170
|
-
</ol>
|
|
171
|
-
<li>node_array</li>
|
|
172
|
-
<ol>
|
|
173
|
-
<li>
|
|
174
|
-
<button class="sub" onclick="get_nodearray_data();">show data</button>
|
|
175
|
-
</li>
|
|
176
|
-
<li>
|
|
177
|
-
<button class="sub" onclick="save_nodearray_file();">save file</button>
|
|
178
|
-
</li>
|
|
179
|
-
<li><input id="file_input_nodearray" class="file_input" type="file" /></li>
|
|
180
|
-
<li><button class="sub" onclick="open_nodearray();">open file</button></li>
|
|
181
|
-
</ol>
|
|
182
|
-
<li>freemind(.mm)</li>
|
|
183
|
-
<ol>
|
|
184
|
-
<li>
|
|
185
|
-
<button class="sub" onclick="get_freemind_data();">show data</button>
|
|
186
|
-
</li>
|
|
187
|
-
<li>
|
|
188
|
-
<button class="sub" onclick="save_freemind_file();">save file</button>
|
|
189
|
-
</li>
|
|
190
|
-
<li><input id="file_input_freemind" class="file_input" type="file" /></li>
|
|
191
|
-
<li><button class="sub" onclick="open_freemind();">open file</button></li>
|
|
192
|
-
</ol>
|
|
193
|
-
</ol>
|
|
194
|
-
</div>
|
|
195
|
-
<div id="jsmind_container"></div>
|
|
196
|
-
<div style="display: none">
|
|
197
|
-
<input class="file" type="file" id="image-chooser" accept="image/*" />
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
<script
|
|
201
|
-
type="text/javascript"
|
|
202
|
-
src="//jsd.onmicrosoft.cn/npm/jsmind@0.8.7/es6/jsmind.js"
|
|
203
|
-
></script>
|
|
204
|
-
<script
|
|
205
|
-
type="text/javascript"
|
|
206
|
-
src="//jsd.onmicrosoft.cn/npm/jsmind@0.8.7/es6/jsmind.draggable-node.js"
|
|
207
|
-
></script>
|
|
208
|
-
<script
|
|
209
|
-
type="text/javascript"
|
|
210
|
-
src="//jsd.onmicrosoft.cn/npm/dom-to-image@2.6.0/dist/dom-to-image.min.js"
|
|
211
|
-
></script>
|
|
212
|
-
<script
|
|
213
|
-
type="text/javascript"
|
|
214
|
-
src="//jsd.onmicrosoft.cn/npm/jsmind@0.8.7/es6/jsmind.screenshot.js"
|
|
215
|
-
></script>
|
|
216
|
-
<script type="text/javascript" src="2_features.js"></script>
|
|
217
|
-
</body>
|
|
218
|
-
</html>
|
package/example/3_requirejs.html
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>jsMind</title>
|
|
7
|
-
<link
|
|
8
|
-
type="text/css"
|
|
9
|
-
rel="stylesheet"
|
|
10
|
-
href="https://unpkg.com/jsmind@0.8.7/style/jsmind.css"
|
|
11
|
-
/>
|
|
12
|
-
<style type="text/css">
|
|
13
|
-
#jsmind_container {
|
|
14
|
-
width: 900px;
|
|
15
|
-
height: 600px;
|
|
16
|
-
border: solid 1px #ccc;
|
|
17
|
-
background: #f4f4f4;
|
|
18
|
-
}
|
|
19
|
-
</style>
|
|
20
|
-
</head>
|
|
21
|
-
|
|
22
|
-
<body>
|
|
23
|
-
<p>查看页面源文件了解具体写法</p>
|
|
24
|
-
<p>See the page source for details</p>
|
|
25
|
-
<div id="jsmind_container"></div>
|
|
26
|
-
</body>
|
|
27
|
-
|
|
28
|
-
<script src="https://requirejs.org/docs/release/2.3.6/minified/require.js"></script>
|
|
29
|
-
<script type="text/javascript">
|
|
30
|
-
require.config({
|
|
31
|
-
paths: {
|
|
32
|
-
'jsmind': 'https://unpkg.com/jsmind@0.8.7/es6/jsmind',
|
|
33
|
-
'jsmind/draggable-node': 'https://unpkg.com/jsmind@0.8.7/es6/jsmind.draggable-node',
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
require(['jsmind', 'jsmind/draggable-node'], function (jsMind, _) {
|
|
37
|
-
let mind = {
|
|
38
|
-
meta: {
|
|
39
|
-
name: 'jsMind example',
|
|
40
|
-
author: 'hizzgdev@163.com',
|
|
41
|
-
version: '0.8.7',
|
|
42
|
-
},
|
|
43
|
-
format: 'node_tree',
|
|
44
|
-
data: {
|
|
45
|
-
id: 'root',
|
|
46
|
-
topic: 'jsMind',
|
|
47
|
-
children: [],
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
let options = {
|
|
51
|
-
container: 'jsmind_container',
|
|
52
|
-
editable: true,
|
|
53
|
-
theme: 'primary',
|
|
54
|
-
};
|
|
55
|
-
let jm = new jsMind(options);
|
|
56
|
-
jm.show(mind);
|
|
57
|
-
});
|
|
58
|
-
</script>
|
|
59
|
-
</html>
|
package/example/ant.png
DELETED
|
Binary file
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"name": "jsMind remote",
|
|
4
|
-
"author": "hizzgdev@163.com",
|
|
5
|
-
"version": "0.2"
|
|
6
|
-
},
|
|
7
|
-
"format": "node_tree",
|
|
8
|
-
"data": {
|
|
9
|
-
"id": "root",
|
|
10
|
-
"topic": "jsMind",
|
|
11
|
-
"children": [
|
|
12
|
-
{
|
|
13
|
-
"id": "easy",
|
|
14
|
-
"topic": "Easy",
|
|
15
|
-
"direction": "left",
|
|
16
|
-
"expanded": false,
|
|
17
|
-
"children": [
|
|
18
|
-
{ "id": "easy1", "topic": "Easy to show" },
|
|
19
|
-
{ "id": "easy2", "topic": "Easy to edit" },
|
|
20
|
-
{ "id": "easy3", "topic": "Easy to store" },
|
|
21
|
-
{
|
|
22
|
-
"id": "easy4",
|
|
23
|
-
"topic": "Easy to embed",
|
|
24
|
-
"children": [
|
|
25
|
-
{ "id": "easy41", "topic": "Easy to show" },
|
|
26
|
-
{ "id": "easy42", "topic": "Easy to edit" },
|
|
27
|
-
{ "id": "easy43", "topic": "Easy to store" },
|
|
28
|
-
{
|
|
29
|
-
"id": "open44",
|
|
30
|
-
"topic": "BSD License",
|
|
31
|
-
"children": [
|
|
32
|
-
{ "id": "open441", "topic": "on GitHub" },
|
|
33
|
-
{ "id": "open442", "topic": "BSD License" }
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
{ "id": "easy45", "topic": "Easy to embed" }
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"id": "open",
|
|
43
|
-
"topic": "Open Source",
|
|
44
|
-
"direction": "right",
|
|
45
|
-
"children": [
|
|
46
|
-
{ "id": "open1", "topic": "on GitHub" },
|
|
47
|
-
{
|
|
48
|
-
"id": "open2",
|
|
49
|
-
"topic": "BSD License",
|
|
50
|
-
"children": [
|
|
51
|
-
{ "id": "open21", "topic": "on GitHub" },
|
|
52
|
-
{
|
|
53
|
-
"id": "open22",
|
|
54
|
-
"topic": "BSD License",
|
|
55
|
-
"children": [
|
|
56
|
-
{ "id": "open221", "topic": "on GitHub" },
|
|
57
|
-
{ "id": "open222", "topic": "BSD License" }
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"id": "powerful",
|
|
66
|
-
"topic": "Powerful",
|
|
67
|
-
"direction": "right",
|
|
68
|
-
"expanded": false,
|
|
69
|
-
"children": [
|
|
70
|
-
{ "id": "powerful1", "topic": "Base on Javascript" },
|
|
71
|
-
{ "id": "powerful2", "topic": "Base on HTML5" },
|
|
72
|
-
{
|
|
73
|
-
"id": "powerful3",
|
|
74
|
-
"topic": "Depends on you",
|
|
75
|
-
"expanded": false,
|
|
76
|
-
"children": [
|
|
77
|
-
{ "id": "powerful31", "topic": "Base on Javascript" },
|
|
78
|
-
{ "id": "powerful32", "topic": "Base on HTML5" },
|
|
79
|
-
{ "id": "powerful33", "topic": "Depends on you" }
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"id": "other",
|
|
86
|
-
"topic": "test node",
|
|
87
|
-
"direction": "left",
|
|
88
|
-
"children": [
|
|
89
|
-
{ "id": "other1", "topic": "I'm from remote" },
|
|
90
|
-
{ "id": "other2", "topic": "I can do everything" }
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
}
|
package/example/demo.html
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>jsMind</title>
|
|
7
|
-
<link type="text/css" rel="stylesheet" href="../style/jsmind.css" />
|
|
8
|
-
<style type="text/css">
|
|
9
|
-
#jsmind_container {
|
|
10
|
-
width: 800px;
|
|
11
|
-
height: 500px;
|
|
12
|
-
border: solid 1px #ccc;
|
|
13
|
-
/*background:#f4f4f4;*/
|
|
14
|
-
background: #f4f4f4;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
<body>
|
|
19
|
-
<input type="file" onchange="load_file(this);" />
|
|
20
|
-
<button onclick="save_nodetree();">nodetree</button>
|
|
21
|
-
<button onclick="replay();">replay</button>
|
|
22
|
-
<div id="jsmind_container"></div>
|
|
23
|
-
<script type="text/javascript" src="../es6/jsmind.js"></script>
|
|
24
|
-
<script type="text/javascript" src="../es6/jsmind.draggable-node.js"></script>
|
|
25
|
-
<script type="text/javascript" src="../features/jsmind.shell.js"></script>
|
|
26
|
-
<script type="text/javascript">
|
|
27
|
-
var _jm = null;
|
|
28
|
-
function load_jsmind() {
|
|
29
|
-
var mind = {
|
|
30
|
-
meta: {
|
|
31
|
-
name: 'demo',
|
|
32
|
-
author: 'hizzgdev@163.com',
|
|
33
|
-
version: '0.2',
|
|
34
|
-
},
|
|
35
|
-
format: 'node_array',
|
|
36
|
-
data: [
|
|
37
|
-
{ id: 'root', isroot: true, topic: 'jsMind' },
|
|
38
|
-
|
|
39
|
-
{ id: 'sub1', parentid: 'root', topic: 'sub1' },
|
|
40
|
-
{ id: 'sub11', parentid: 'sub1', topic: 'sub11' },
|
|
41
|
-
{ id: 'sub12', parentid: 'sub1', topic: 'sub12' },
|
|
42
|
-
{ id: 'sub13', parentid: 'sub1', topic: 'sub13' },
|
|
43
|
-
|
|
44
|
-
{ id: 'sub2', parentid: 'root', topic: 'sub2' },
|
|
45
|
-
{ id: 'sub21', parentid: 'sub2', topic: 'sub21' },
|
|
46
|
-
{ id: 'sub22', parentid: 'sub2', topic: 'sub22' },
|
|
47
|
-
|
|
48
|
-
{ id: 'sub3', parentid: 'root', topic: 'sub3' },
|
|
49
|
-
],
|
|
50
|
-
};
|
|
51
|
-
var options = {
|
|
52
|
-
container: 'jsmind_container',
|
|
53
|
-
editable: true,
|
|
54
|
-
theme: 'primary',
|
|
55
|
-
log_level: 'debug',
|
|
56
|
-
shortcut: {
|
|
57
|
-
handles: {
|
|
58
|
-
test: function (j, e) {
|
|
59
|
-
console.log(j);
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
mapping: {
|
|
63
|
-
test: 89,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
view: {
|
|
67
|
-
expander_style: 'char',
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
_jm = new jsMind(options);
|
|
71
|
-
_jm.show(mind);
|
|
72
|
-
// jm.set_readonly(true);
|
|
73
|
-
// var mind_data = jm.get_data();
|
|
74
|
-
// alert(mind_data);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function load_file(fi) {
|
|
78
|
-
var files = fi.files;
|
|
79
|
-
if (files.length > 0) {
|
|
80
|
-
var file_data = files[0];
|
|
81
|
-
jsMind.util.file.read(file_data, function (freemind_data, jsmind_name) {
|
|
82
|
-
var mind = jsmind_data;
|
|
83
|
-
if (!!mind) {
|
|
84
|
-
_jm.show(mind);
|
|
85
|
-
} else {
|
|
86
|
-
console.error('can not open this file as mindmap');
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function save_nodetree() {
|
|
93
|
-
var mind_data = _jm.get_data('node_tree');
|
|
94
|
-
console.log(mind_data);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function replay() {
|
|
98
|
-
var shell = _jm.shell;
|
|
99
|
-
if (!!shell) {
|
|
100
|
-
shell.replay();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
load_jsmind();
|
|
105
|
-
</script>
|
|
106
|
-
</body>
|
|
107
|
-
</html>
|
package/js/README.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
ES6 版本现已发布,详情请查阅 [../es6/README.md](../es6/README.md) 。
|
|
2
|
-
|
|
3
|
-
老版 jsmind 以及对应的插件已移至 `js-legacy` 目录下。它们将停留在 0.5.7 版本。我们将不再升级它,并会在未来的某个时间里删除它们。建议使用最新的 ES6 版本以获得最新的功能及 bug 修复。
|
|
4
|
-
|
|
5
|
-
The ES6 version of jsMind has been launched. see details from [../es6/README-en.md](../es6/README-en.md).
|
|
6
|
-
|
|
7
|
-
Legacy version of jsmind.js and plugins have been moved to `/js-legacy`. They will be in version 0.5.7, and won't be updated. We will remove them one day in the future. It is recommended to use the latest ES6 version to obtain new features and bug fixes.
|