jsmind 0.5.7 → 0.6.1

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.
@@ -0,0 +1,80 @@
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="//cdn.jsdelivr.net/npm/jsmind/style/jsmind.css"
11
+ />
12
+ <style type="text/css">
13
+ #jsmind_container {
14
+ width: 800px;
15
+ height: 500px;
16
+ border: solid 1px #ccc;
17
+ /*background:#f4f4f4;*/
18
+ background: #f4f4f4;
19
+ }
20
+ </style>
21
+ </head>
22
+ <body>
23
+ <div id="jsmind_container"></div>
24
+ <script type="text/javascript" src="//cdn.jsdelivr.net/npm/jsmind/es6/jsmind.js"></script>
25
+ <script
26
+ type="text/javascript"
27
+ src="//cdn.jsdelivr.net/npm/jsmind/es6/jsmind.draggable-node.js"
28
+ ></script>
29
+ <script type="text/javascript">
30
+ function load_jsmind() {
31
+ var mind = {
32
+ meta: {
33
+ name: 'demo',
34
+ author: 'hizzgdev@163.com',
35
+ version: '0.2',
36
+ },
37
+ format: 'node_array',
38
+ data: [
39
+ { id: 'root', isroot: true, topic: 'jsMind' },
40
+
41
+ {
42
+ 'id': 'sub1',
43
+ 'parentid': 'root',
44
+ 'topic': 'sub1',
45
+ 'background-color': '#0000ff',
46
+ },
47
+ { id: 'sub11', parentid: 'sub1', topic: 'sub11' },
48
+ { id: 'sub12', parentid: 'sub1', topic: 'sub12' },
49
+ { id: 'sub13', parentid: 'sub1', topic: 'sub13' },
50
+
51
+ { id: 'sub2', parentid: 'root', topic: 'sub2' },
52
+ { id: 'sub21', parentid: 'sub2', topic: 'sub21' },
53
+ {
54
+ 'id': 'sub22',
55
+ 'parentid': 'sub2',
56
+ 'topic': 'sub22',
57
+ 'foreground-color': '#33ff33',
58
+ },
59
+
60
+ { id: 'sub3', parentid: 'root', topic: 'sub3' },
61
+ ],
62
+ };
63
+ var options = {
64
+ container: 'jsmind_container',
65
+ editable: true,
66
+ theme: 'primary',
67
+ };
68
+ var jm = new jsMind(options);
69
+ jm.show(mind);
70
+ // jm.set_readonly(true);
71
+ // var mind_data = jm.get_data();
72
+ // alert(mind_data);
73
+ jm.add_node('sub2', 'sub23', 'new node', { 'background-color': 'red' });
74
+ jm.set_node_color('sub21', 'green', '#ccc');
75
+ }
76
+
77
+ load_jsmind();
78
+ </script>
79
+ </body>
80
+ </html>
@@ -0,0 +1,81 @@
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/style/jsmind.css"
11
+ />
12
+ <style type="text/css">
13
+ #jsmind_container {
14
+ width: 800px;
15
+ height: 500px;
16
+ border: solid 1px #ccc;
17
+ /*background:#f4f4f4;*/
18
+ background: #f4f4f4;
19
+ }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <div id="jsmind_container"></div>
25
+ <script type="text/javascript" src="//jsd.onmicrosoft.cn/npm/jsmind/es6/jsmind.js"></script>
26
+ <script
27
+ type="text/javascript"
28
+ src="//jsd.onmicrosoft.cn/npm/jsmind/es6/jsmind.draggable-node.js"
29
+ ></script>
30
+ <script type="text/javascript">
31
+ function load_jsmind() {
32
+ var mind = {
33
+ meta: {
34
+ name: 'demo',
35
+ author: 'hizzgdev@163.com',
36
+ version: '0.2',
37
+ },
38
+ format: 'node_array',
39
+ data: [
40
+ { id: 'root', isroot: true, topic: 'jsMind' },
41
+
42
+ {
43
+ 'id': 'sub1',
44
+ 'parentid': 'root',
45
+ 'topic': 'sub1',
46
+ 'background-color': '#0000ff',
47
+ },
48
+ { id: 'sub11', parentid: 'sub1', topic: 'sub11' },
49
+ { id: 'sub12', parentid: 'sub1', topic: 'sub12' },
50
+ { id: 'sub13', parentid: 'sub1', topic: 'sub13' },
51
+
52
+ { id: 'sub2', parentid: 'root', topic: 'sub2' },
53
+ { id: 'sub21', parentid: 'sub2', topic: 'sub21' },
54
+ {
55
+ 'id': 'sub22',
56
+ 'parentid': 'sub2',
57
+ 'topic': 'sub22',
58
+ 'foreground-color': '#33ff33',
59
+ },
60
+
61
+ { id: 'sub3', parentid: 'root', topic: 'sub3' },
62
+ ],
63
+ };
64
+ var options = {
65
+ container: 'jsmind_container',
66
+ editable: true,
67
+ theme: 'primary',
68
+ };
69
+ var jm = new jsMind(options);
70
+ jm.show(mind);
71
+ // jm.set_readonly(true);
72
+ // var mind_data = jm.get_data();
73
+ // alert(mind_data);
74
+ jm.add_node('sub2', 'sub23', 'new node', { 'background-color': 'red' });
75
+ jm.set_node_color('sub21', 'green', '#ccc');
76
+ }
77
+
78
+ load_jsmind();
79
+ </script>
80
+ </body>
81
+ </html>