jsmind 0.4.6 → 0.4.10
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/LICENSE +2 -2
- package/README.md +45 -31
- package/docs/en/1.usage.md +11 -11
- package/docs/en/2.options.md +213 -1
- package/docs/en/3.operation.md +137 -1
- package/docs/en/4.contribution.md +35 -0
- package/docs/en/5.development.md +18 -0
- package/docs/en/index.md +23 -12
- package/docs/zh/1.usage.md +22 -20
- package/docs/zh/2.options.md +54 -8
- package/docs/zh/3.operation.md +35 -21
- package/docs/zh/4.contribution.md +41 -0
- package/docs/zh/5.development.md +78 -0
- package/docs/zh/index.md +2 -1
- package/es6/jsmind.draggable-node.js +9 -0
- package/es6/jsmind.draggable-node.js.map +1 -0
- package/es6/jsmind.js +9 -0
- package/es6/jsmind.js.map +1 -0
- package/es6/jsmind.screenshot.js +9 -0
- package/es6/jsmind.screenshot.js.map +1 -0
- package/js/{jsmind.draggable.js → jsmind.draggable-node.js} +128 -122
- package/js/jsmind.js +1211 -1064
- package/js/jsmind.screenshot.js +139 -137
- package/package.json +51 -31
- package/style/jsmind.css +357 -114
- package/example/1_basic.html +0 -62
- package/example/2_features.html +0 -526
- package/example/ant.png +0 -0
- package/example/data_example.json +0 -48
- package/example/demo.html +0 -102
- package/features/jsmind.shell.js +0 -116
- package/screenshots/jsmind.png +0 -0
package/style/jsmind.css
CHANGED
|
@@ -1,159 +1,402 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* @license BSD
|
|
3
|
+
* @copyright 2014-2022 hizzgdev@163.com
|
|
4
4
|
*
|
|
5
5
|
* Project Home:
|
|
6
6
|
* https://github.com/hizzgdev/jsmind/
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/* important section */
|
|
10
|
-
.jsmind-inner{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
user-select:none;
|
|
10
|
+
.jsmind-inner {
|
|
11
|
+
position: relative;
|
|
12
|
+
overflow: auto;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
outline: none;
|
|
16
|
+
} /*box-shadow:0 0 2px #000;*/
|
|
17
|
+
.jsmind-inner {
|
|
18
|
+
moz-user-select: -moz-none;
|
|
19
|
+
-moz-user-select: none;
|
|
20
|
+
-o-user-select: none;
|
|
21
|
+
-khtml-user-select: none;
|
|
22
|
+
-webkit-user-select: none;
|
|
23
|
+
-ms-user-select: none;
|
|
24
|
+
user-select: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.jsmind-inner canvas {
|
|
28
|
+
position: absolute;
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
/* z-index:1 */
|
|
22
|
-
|
|
32
|
+
svg.jsmind {
|
|
33
|
+
position: absolute;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
}
|
|
36
|
+
canvas.jsmind {
|
|
37
|
+
position: absolute;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
23
40
|
|
|
24
41
|
/* z-index:2 */
|
|
25
|
-
jmnodes{
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
jmnodes {
|
|
43
|
+
position: absolute;
|
|
44
|
+
z-index: 2;
|
|
45
|
+
background-color: rgba(0, 0, 0, 0);
|
|
46
|
+
} /*background color is necessary*/
|
|
47
|
+
jmnode {
|
|
48
|
+
position: absolute;
|
|
49
|
+
cursor: default;
|
|
50
|
+
max-width: 400px;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
text-overflow: ellipsis;
|
|
54
|
+
}
|
|
55
|
+
jmexpander {
|
|
56
|
+
position: absolute;
|
|
57
|
+
width: 11px;
|
|
58
|
+
height: 11px;
|
|
59
|
+
display: block;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
line-height: 12px;
|
|
62
|
+
font-size: 12px;
|
|
63
|
+
text-align: center;
|
|
64
|
+
border-radius: 6px;
|
|
65
|
+
border-width: 1px;
|
|
66
|
+
border-style: solid;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
28
69
|
|
|
29
70
|
/* default theme */
|
|
30
|
-
jmnode{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
71
|
+
jmnode {
|
|
72
|
+
padding: 10px;
|
|
73
|
+
background-color: #fff;
|
|
74
|
+
color: #333;
|
|
75
|
+
border-radius: 5px;
|
|
76
|
+
box-shadow: 1px 1px 1px #666;
|
|
77
|
+
font: 16px/1.125 Verdana, Arial, Helvetica, sans-serif;
|
|
78
|
+
}
|
|
79
|
+
jmnode:hover {
|
|
80
|
+
box-shadow: 2px 2px 8px #000;
|
|
81
|
+
background-color: #ebebeb;
|
|
82
|
+
color: #333;
|
|
83
|
+
}
|
|
84
|
+
jmnode.selected {
|
|
85
|
+
background-color: #11f;
|
|
86
|
+
color: #fff;
|
|
87
|
+
box-shadow: 2px 2px 8px #000;
|
|
88
|
+
}
|
|
89
|
+
jmnode.root {
|
|
90
|
+
font-size: 24px;
|
|
91
|
+
}
|
|
92
|
+
jmexpander {
|
|
93
|
+
border-color: gray;
|
|
94
|
+
}
|
|
95
|
+
jmexpander:hover {
|
|
96
|
+
border-color: #000;
|
|
97
|
+
}
|
|
36
98
|
|
|
37
99
|
@media screen and (max-device-width: 1024px) {
|
|
38
|
-
jmnode{
|
|
39
|
-
|
|
100
|
+
jmnode {
|
|
101
|
+
padding: 5px;
|
|
102
|
+
border-radius: 3px;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
}
|
|
105
|
+
jmnode.root {
|
|
106
|
+
font-size: 21px;
|
|
107
|
+
}
|
|
40
108
|
}
|
|
41
109
|
/* primary theme */
|
|
42
|
-
jmnodes.theme-primary jmnode{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
jmnodes.theme-primary
|
|
110
|
+
jmnodes.theme-primary jmnode {
|
|
111
|
+
background-color: #428bca;
|
|
112
|
+
color: #fff;
|
|
113
|
+
border-color: #357ebd;
|
|
114
|
+
}
|
|
115
|
+
jmnodes.theme-primary jmnode:hover {
|
|
116
|
+
background-color: #3276b1;
|
|
117
|
+
border-color: #285e8e;
|
|
118
|
+
}
|
|
119
|
+
jmnodes.theme-primary jmnode.selected {
|
|
120
|
+
background-color: #f1c40f;
|
|
121
|
+
color: #fff;
|
|
122
|
+
}
|
|
123
|
+
jmnodes.theme-primary jmnode.root {
|
|
124
|
+
}
|
|
125
|
+
jmnodes.theme-primary jmexpander {
|
|
126
|
+
}
|
|
127
|
+
jmnodes.theme-primary jmexpander:hover {
|
|
128
|
+
}
|
|
48
129
|
|
|
49
130
|
/* warning theme */
|
|
50
|
-
jmnodes.theme-warning jmnode{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
jmnodes.theme-warning
|
|
131
|
+
jmnodes.theme-warning jmnode {
|
|
132
|
+
background-color: #f0ad4e;
|
|
133
|
+
border-color: #eea236;
|
|
134
|
+
color: #fff;
|
|
135
|
+
}
|
|
136
|
+
jmnodes.theme-warning jmnode:hover {
|
|
137
|
+
background-color: #ed9c28;
|
|
138
|
+
border-color: #d58512;
|
|
139
|
+
}
|
|
140
|
+
jmnodes.theme-warning jmnode.selected {
|
|
141
|
+
background-color: #11f;
|
|
142
|
+
color: #fff;
|
|
143
|
+
}
|
|
144
|
+
jmnodes.theme-warning jmnode.root {
|
|
145
|
+
}
|
|
146
|
+
jmnodes.theme-warning jmexpander {
|
|
147
|
+
}
|
|
148
|
+
jmnodes.theme-warning jmexpander:hover {
|
|
149
|
+
}
|
|
56
150
|
|
|
57
151
|
/* danger theme */
|
|
58
|
-
jmnodes.theme-danger jmnode{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
jmnodes.theme-danger
|
|
152
|
+
jmnodes.theme-danger jmnode {
|
|
153
|
+
background-color: #d9534f;
|
|
154
|
+
border-color: #d43f3a;
|
|
155
|
+
color: #fff;
|
|
156
|
+
}
|
|
157
|
+
jmnodes.theme-danger jmnode:hover {
|
|
158
|
+
background-color: #d2322d;
|
|
159
|
+
border-color: #ac2925;
|
|
160
|
+
}
|
|
161
|
+
jmnodes.theme-danger jmnode.selected {
|
|
162
|
+
background-color: #11f;
|
|
163
|
+
color: #fff;
|
|
164
|
+
}
|
|
165
|
+
jmnodes.theme-danger jmnode.root {
|
|
166
|
+
}
|
|
167
|
+
jmnodes.theme-danger jmexpander {
|
|
168
|
+
}
|
|
169
|
+
jmnodes.theme-danger jmexpander:hover {
|
|
170
|
+
}
|
|
64
171
|
|
|
65
172
|
/* success theme */
|
|
66
|
-
jmnodes.theme-success jmnode{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
jmnodes.theme-success
|
|
173
|
+
jmnodes.theme-success jmnode {
|
|
174
|
+
background-color: #5cb85c;
|
|
175
|
+
border-color: #4cae4c;
|
|
176
|
+
color: #fff;
|
|
177
|
+
}
|
|
178
|
+
jmnodes.theme-success jmnode:hover {
|
|
179
|
+
background-color: #47a447;
|
|
180
|
+
border-color: #398439;
|
|
181
|
+
}
|
|
182
|
+
jmnodes.theme-success jmnode.selected {
|
|
183
|
+
background-color: #11f;
|
|
184
|
+
color: #fff;
|
|
185
|
+
}
|
|
186
|
+
jmnodes.theme-success jmnode.root {
|
|
187
|
+
}
|
|
188
|
+
jmnodes.theme-success jmexpander {
|
|
189
|
+
}
|
|
190
|
+
jmnodes.theme-success jmexpander:hover {
|
|
191
|
+
}
|
|
72
192
|
|
|
73
193
|
/* info theme */
|
|
74
|
-
jmnodes.theme-info jmnode{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
jmnodes.theme-info
|
|
194
|
+
jmnodes.theme-info jmnode {
|
|
195
|
+
background-color: #5dc0de;
|
|
196
|
+
border-color: #46b8da;
|
|
197
|
+
color: #fff;
|
|
198
|
+
}
|
|
199
|
+
jmnodes.theme-info jmnode:hover {
|
|
200
|
+
background-color: #39b3d7;
|
|
201
|
+
border-color: #269abc;
|
|
202
|
+
}
|
|
203
|
+
jmnodes.theme-info jmnode.selected {
|
|
204
|
+
background-color: #11f;
|
|
205
|
+
color: #fff;
|
|
206
|
+
}
|
|
207
|
+
jmnodes.theme-info jmnode.root {
|
|
208
|
+
}
|
|
209
|
+
jmnodes.theme-info jmexpander {
|
|
210
|
+
}
|
|
211
|
+
jmnodes.theme-info jmexpander:hover {
|
|
212
|
+
}
|
|
80
213
|
|
|
81
214
|
/* greensea theme */
|
|
82
|
-
jmnodes.theme-greensea jmnode{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
jmnodes.theme-greensea
|
|
87
|
-
|
|
215
|
+
jmnodes.theme-greensea jmnode {
|
|
216
|
+
background-color: #1abc9c;
|
|
217
|
+
color: #fff;
|
|
218
|
+
}
|
|
219
|
+
jmnodes.theme-greensea jmnode:hover {
|
|
220
|
+
background-color: #16a085;
|
|
221
|
+
}
|
|
222
|
+
jmnodes.theme-greensea jmnode.selected {
|
|
223
|
+
background-color: #11f;
|
|
224
|
+
color: #fff;
|
|
225
|
+
}
|
|
226
|
+
jmnodes.theme-greensea jmnode.root {
|
|
227
|
+
}
|
|
228
|
+
jmnodes.theme-greensea jmexpander {
|
|
229
|
+
}
|
|
230
|
+
jmnodes.theme-greensea jmexpander:hover {
|
|
231
|
+
}
|
|
88
232
|
|
|
89
233
|
/* nephrite theme */
|
|
90
|
-
jmnodes.theme-nephrite jmnode{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
jmnodes.theme-nephrite
|
|
95
|
-
|
|
234
|
+
jmnodes.theme-nephrite jmnode {
|
|
235
|
+
background-color: #2ecc71;
|
|
236
|
+
color: #fff;
|
|
237
|
+
}
|
|
238
|
+
jmnodes.theme-nephrite jmnode:hover {
|
|
239
|
+
background-color: #27ae60;
|
|
240
|
+
}
|
|
241
|
+
jmnodes.theme-nephrite jmnode.selected {
|
|
242
|
+
background-color: #11f;
|
|
243
|
+
color: #fff;
|
|
244
|
+
}
|
|
245
|
+
jmnodes.theme-nephrite jmnode.root {
|
|
246
|
+
}
|
|
247
|
+
jmnodes.theme-nephrite jmexpander {
|
|
248
|
+
}
|
|
249
|
+
jmnodes.theme-nephrite jmexpander:hover {
|
|
250
|
+
}
|
|
96
251
|
|
|
97
252
|
/* belizehole theme */
|
|
98
|
-
jmnodes.theme-belizehole jmnode{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
jmnodes.theme-belizehole
|
|
103
|
-
|
|
253
|
+
jmnodes.theme-belizehole jmnode {
|
|
254
|
+
background-color: #3498db;
|
|
255
|
+
color: #fff;
|
|
256
|
+
}
|
|
257
|
+
jmnodes.theme-belizehole jmnode:hover {
|
|
258
|
+
background-color: #2980b9;
|
|
259
|
+
}
|
|
260
|
+
jmnodes.theme-belizehole jmnode.selected {
|
|
261
|
+
background-color: #11f;
|
|
262
|
+
color: #fff;
|
|
263
|
+
}
|
|
264
|
+
jmnodes.theme-belizehole jmnode.root {
|
|
265
|
+
}
|
|
266
|
+
jmnodes.theme-belizehole jmexpander {
|
|
267
|
+
}
|
|
268
|
+
jmnodes.theme-belizehole jmexpander:hover {
|
|
269
|
+
}
|
|
104
270
|
|
|
105
271
|
/* wisteria theme */
|
|
106
|
-
jmnodes.theme-wisteria jmnode{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
jmnodes.theme-wisteria
|
|
111
|
-
|
|
272
|
+
jmnodes.theme-wisteria jmnode {
|
|
273
|
+
background-color: #9b59b6;
|
|
274
|
+
color: #fff;
|
|
275
|
+
}
|
|
276
|
+
jmnodes.theme-wisteria jmnode:hover {
|
|
277
|
+
background-color: #8e44ad;
|
|
278
|
+
}
|
|
279
|
+
jmnodes.theme-wisteria jmnode.selected {
|
|
280
|
+
background-color: #11f;
|
|
281
|
+
color: #fff;
|
|
282
|
+
}
|
|
283
|
+
jmnodes.theme-wisteria jmnode.root {
|
|
284
|
+
}
|
|
285
|
+
jmnodes.theme-wisteria jmexpander {
|
|
286
|
+
}
|
|
287
|
+
jmnodes.theme-wisteria jmexpander:hover {
|
|
288
|
+
}
|
|
112
289
|
|
|
113
290
|
/* asphalt theme */
|
|
114
|
-
jmnodes.theme-asphalt jmnode{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
jmnodes.theme-asphalt
|
|
119
|
-
|
|
291
|
+
jmnodes.theme-asphalt jmnode {
|
|
292
|
+
background-color: #34495e;
|
|
293
|
+
color: #fff;
|
|
294
|
+
}
|
|
295
|
+
jmnodes.theme-asphalt jmnode:hover {
|
|
296
|
+
background-color: #2c3e50;
|
|
297
|
+
}
|
|
298
|
+
jmnodes.theme-asphalt jmnode.selected {
|
|
299
|
+
background-color: #11f;
|
|
300
|
+
color: #fff;
|
|
301
|
+
}
|
|
302
|
+
jmnodes.theme-asphalt jmnode.root {
|
|
303
|
+
}
|
|
304
|
+
jmnodes.theme-asphalt jmexpander {
|
|
305
|
+
}
|
|
306
|
+
jmnodes.theme-asphalt jmexpander:hover {
|
|
307
|
+
}
|
|
120
308
|
|
|
121
309
|
/* orange theme */
|
|
122
|
-
jmnodes.theme-orange jmnode{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
jmnodes.theme-orange
|
|
127
|
-
|
|
310
|
+
jmnodes.theme-orange jmnode {
|
|
311
|
+
background-color: #f1c40f;
|
|
312
|
+
color: #fff;
|
|
313
|
+
}
|
|
314
|
+
jmnodes.theme-orange jmnode:hover {
|
|
315
|
+
background-color: #f39c12;
|
|
316
|
+
}
|
|
317
|
+
jmnodes.theme-orange jmnode.selected {
|
|
318
|
+
background-color: #11f;
|
|
319
|
+
color: #fff;
|
|
320
|
+
}
|
|
321
|
+
jmnodes.theme-orange jmnode.root {
|
|
322
|
+
}
|
|
323
|
+
jmnodes.theme-orange jmexpander {
|
|
324
|
+
}
|
|
325
|
+
jmnodes.theme-orange jmexpander:hover {
|
|
326
|
+
}
|
|
128
327
|
|
|
129
328
|
/* pumpkin theme */
|
|
130
|
-
jmnodes.theme-pumpkin jmnode{
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
jmnodes.theme-pumpkin
|
|
135
|
-
|
|
329
|
+
jmnodes.theme-pumpkin jmnode {
|
|
330
|
+
background-color: #e67e22;
|
|
331
|
+
color: #fff;
|
|
332
|
+
}
|
|
333
|
+
jmnodes.theme-pumpkin jmnode:hover {
|
|
334
|
+
background-color: #d35400;
|
|
335
|
+
}
|
|
336
|
+
jmnodes.theme-pumpkin jmnode.selected {
|
|
337
|
+
background-color: #11f;
|
|
338
|
+
color: #fff;
|
|
339
|
+
}
|
|
340
|
+
jmnodes.theme-pumpkin jmnode.root {
|
|
341
|
+
}
|
|
342
|
+
jmnodes.theme-pumpkin jmexpander {
|
|
343
|
+
}
|
|
344
|
+
jmnodes.theme-pumpkin jmexpander:hover {
|
|
345
|
+
}
|
|
136
346
|
|
|
137
347
|
/* pomegranate theme */
|
|
138
|
-
jmnodes.theme-pomegranate jmnode{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
jmnodes.theme-pomegranate
|
|
143
|
-
|
|
348
|
+
jmnodes.theme-pomegranate jmnode {
|
|
349
|
+
background-color: #e74c3c;
|
|
350
|
+
color: #fff;
|
|
351
|
+
}
|
|
352
|
+
jmnodes.theme-pomegranate jmnode:hover {
|
|
353
|
+
background-color: #c0392b;
|
|
354
|
+
}
|
|
355
|
+
jmnodes.theme-pomegranate jmnode.selected {
|
|
356
|
+
background-color: #11f;
|
|
357
|
+
color: #fff;
|
|
358
|
+
}
|
|
359
|
+
jmnodes.theme-pomegranate jmnode.root {
|
|
360
|
+
}
|
|
361
|
+
jmnodes.theme-pomegranate jmexpander {
|
|
362
|
+
}
|
|
363
|
+
jmnodes.theme-pomegranate jmexpander:hover {
|
|
364
|
+
}
|
|
144
365
|
|
|
145
366
|
/* clouds theme */
|
|
146
|
-
jmnodes.theme-clouds jmnode{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
jmnodes.theme-clouds
|
|
151
|
-
|
|
367
|
+
jmnodes.theme-clouds jmnode {
|
|
368
|
+
background-color: #ecf0f1;
|
|
369
|
+
color: #333;
|
|
370
|
+
}
|
|
371
|
+
jmnodes.theme-clouds jmnode:hover {
|
|
372
|
+
background-color: #bdc3c7;
|
|
373
|
+
}
|
|
374
|
+
jmnodes.theme-clouds jmnode.selected {
|
|
375
|
+
background-color: #11f;
|
|
376
|
+
color: #fff;
|
|
377
|
+
}
|
|
378
|
+
jmnodes.theme-clouds jmnode.root {
|
|
379
|
+
}
|
|
380
|
+
jmnodes.theme-clouds jmexpander {
|
|
381
|
+
}
|
|
382
|
+
jmnodes.theme-clouds jmexpander:hover {
|
|
383
|
+
}
|
|
152
384
|
|
|
153
385
|
/* asbestos theme */
|
|
154
|
-
jmnodes.theme-asbestos jmnode{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
jmnodes.theme-asbestos
|
|
159
|
-
|
|
386
|
+
jmnodes.theme-asbestos jmnode {
|
|
387
|
+
background-color: #95a5a6;
|
|
388
|
+
color: #fff;
|
|
389
|
+
}
|
|
390
|
+
jmnodes.theme-asbestos jmnode:hover {
|
|
391
|
+
background-color: #7f8c8d;
|
|
392
|
+
}
|
|
393
|
+
jmnodes.theme-asbestos jmnode.selected {
|
|
394
|
+
background-color: #11f;
|
|
395
|
+
color: #fff;
|
|
396
|
+
}
|
|
397
|
+
jmnodes.theme-asbestos jmnode.root {
|
|
398
|
+
}
|
|
399
|
+
jmnodes.theme-asbestos jmexpander {
|
|
400
|
+
}
|
|
401
|
+
jmnodes.theme-asbestos jmexpander:hover {
|
|
402
|
+
}
|
package/example/1_basic.html
DELETED
|
@@ -1,62 +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
|
-
<div id="jsmind_container"></div>
|
|
20
|
-
<script type="text/javascript" src="../js/jsmind.js"></script>
|
|
21
|
-
<script type="text/javascript" src="../js/jsmind.draggable.js"></script>
|
|
22
|
-
<script type="text/javascript">
|
|
23
|
-
function load_jsmind(){
|
|
24
|
-
var mind = {
|
|
25
|
-
"meta":{
|
|
26
|
-
"name":"demo",
|
|
27
|
-
"author":"hizzgdev@163.com",
|
|
28
|
-
"version":"0.2",
|
|
29
|
-
},
|
|
30
|
-
"format":"node_array",
|
|
31
|
-
"data":[
|
|
32
|
-
{"id":"root", "isroot":true, "topic":"jsMind"},
|
|
33
|
-
|
|
34
|
-
{"id":"sub1", "parentid":"root", "topic":"sub1", "background-color":"#0000ff"},
|
|
35
|
-
{"id":"sub11", "parentid":"sub1", "topic":"sub11"},
|
|
36
|
-
{"id":"sub12", "parentid":"sub1", "topic":"sub12"},
|
|
37
|
-
{"id":"sub13", "parentid":"sub1", "topic":"sub13"},
|
|
38
|
-
|
|
39
|
-
{"id":"sub2", "parentid":"root", "topic":"sub2"},
|
|
40
|
-
{"id":"sub21", "parentid":"sub2", "topic":"sub21"},
|
|
41
|
-
{"id":"sub22", "parentid":"sub2", "topic":"sub22","foreground-color":"#33ff33"},
|
|
42
|
-
|
|
43
|
-
{"id":"sub3", "parentid":"root", "topic":"sub3"},
|
|
44
|
-
]
|
|
45
|
-
};
|
|
46
|
-
var options = {
|
|
47
|
-
container:'jsmind_container',
|
|
48
|
-
editable:true,
|
|
49
|
-
theme:'primary'
|
|
50
|
-
}
|
|
51
|
-
var jm = jsMind.show(options,mind);
|
|
52
|
-
// jm.set_readonly(true);
|
|
53
|
-
// var mind_data = jm.get_data();
|
|
54
|
-
// alert(mind_data);
|
|
55
|
-
jm.add_node("sub2","sub23", "new node", {"background-color":"red"});
|
|
56
|
-
jm.set_node_color('sub21', 'green', '#ccc');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
load_jsmind();
|
|
60
|
-
</script>
|
|
61
|
-
</body>
|
|
62
|
-
</html>
|