sigma-playground 1.0.9 → 1.0.11
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 +1 -1
- package/README.md +14 -122
- package/lib/index.js +7 -10
- package/package.json +3 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2015-
|
|
3
|
+
Copyright (c) 2015-26 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,90 +1,17 @@
|
|
|
1
1
|
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
3
|
# sigma-playground
|
|
21
4
|
|
|
22
|
-
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [](https://github.com/IonicaBizau/ama) [](https://www.npmjs.com/package/sigma-playground) [](https://www.npmjs.com/package/sigma-playground) [](https://www.codementor.io
|
|
5
|
+
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [](https://github.com/IonicaBizau/ama) [](https://www.npmjs.com/package/sigma-playground) [](https://www.npmjs.com/package/sigma-playground) [](https://www.codementor.io/@johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
|
|
23
6
|
|
|
24
7
|
<a href="https://www.buymeacoffee.com/H96WwChMy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee"></a>
|
|
25
8
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
9
|
> A web app to play with sigma.js graphs.
|
|
33
10
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
11
|
[](https://ionicabizau.github.io/sigma-playground)
|
|
45
12
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## :question: Get Help
|
|
72
|
-
|
|
73
|
-
There are few ways to get help:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
|
|
78
|
-
2. For bug reports and feature requests, open issues. :bug:
|
|
79
|
-
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
13
|
## :memo: Documentation
|
|
86
14
|
|
|
87
|
-
|
|
88
15
|
+-----------------------------------+
|
|
89
16
|
| WELCOME TO SIGMA.JS PLAYGROUND! |
|
|
90
17
|
+-----------------------------------+
|
|
@@ -101,73 +28,38 @@ There are few ways to get help:
|
|
|
101
28
|
|
|
102
29
|
So, have fun! :)
|
|
103
30
|
|
|
31
|
+
## :question: Get Help
|
|
104
32
|
|
|
33
|
+
There are a few ways to get help:
|
|
105
34
|
|
|
35
|
+
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long as you add a link to your Stack Overflow question.
|
|
36
|
+
2. For bug reports and feature requests, open issues. :bug:
|
|
37
|
+
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
|
|
106
38
|
|
|
39
|
+
## :yum: How to Contribute
|
|
107
40
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
## :yum: How to contribute
|
|
118
41
|
Have an idea? Found a bug? See [how to contribute][contributing].
|
|
119
42
|
|
|
43
|
+
## :sparkling_heart: Support My Projects
|
|
120
44
|
|
|
121
|
-
|
|
122
|
-
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
|
|
123
|
-
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
|
|
124
|
-
|
|
125
|
-
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
|
|
45
|
+
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute it (even resell it).
|
|
126
46
|
|
|
47
|
+
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are a few ways you can do it:
|
|
127
48
|
|
|
128
49
|
- Starring and sharing the projects you like :rocket:
|
|
129
|
-
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you
|
|
50
|
+
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you for years if you buy me one. :grin: :book:
|
|
130
51
|
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
|
|
131
52
|
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
|
|
132
|
-
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
|
|
133
|
-
|
|
134
|
-

|
|
53
|
+
- **Bitcoin**—You can send me bitcoins at this address (or by scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
|
|
135
54
|
|
|
55
|
+

|
|
136
56
|
|
|
137
57
|
Thanks! :heart:
|
|
138
58
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
59
|
## :scroll: License
|
|
163
60
|
|
|
164
61
|
[MIT][license] © [Ionică Bizău][website]
|
|
165
62
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
63
|
[license]: /LICENSE
|
|
172
64
|
[website]: https://ionicabizau.net
|
|
173
65
|
[contributing]: /CONTRIBUTING.md
|
|
@@ -177,5 +69,5 @@ Thanks! :heart:
|
|
|
177
69
|
[badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg
|
|
178
70
|
[badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg
|
|
179
71
|
[patreon]: https://www.patreon.com/ionicabizau
|
|
180
|
-
[amazon]:
|
|
72
|
+
[amazon]: https://amzn.eu/hRo9sIZ
|
|
181
73
|
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
// Sigma stuff
|
|
4
2
|
sigma = require("sigma");
|
|
5
3
|
conrad = require("sigma/src/conrad.js");
|
|
@@ -12,19 +10,18 @@ require("sigma/plugins/sigma.renderers.parallelEdges/sigma.canvas.edges.curvedAr
|
|
|
12
10
|
require("sigma/plugins/sigma.renderers.parallelEdges/sigma.canvas.edges.curve.js");
|
|
13
11
|
require("sigma/plugins/sigma.renderers.parallelEdges/sigma.canvas.edges.labels.curve.js");
|
|
14
12
|
require("sigma/plugins/sigma.renderers.parallelEdges/utils.js");
|
|
15
|
-
sigma.renderers.def = sigma.renderers.canvas
|
|
13
|
+
sigma.renderers.def = sigma.renderers.canvas
|
|
16
14
|
|
|
17
15
|
var $result = document.getElementById("result");
|
|
18
16
|
|
|
19
|
-
function update() {
|
|
20
|
-
var result = null
|
|
21
|
-
|
|
17
|
+
function update () {
|
|
18
|
+
var result = null
|
|
19
|
+
, input = editor.getValue()
|
|
20
|
+
;
|
|
22
21
|
|
|
23
22
|
try {
|
|
24
23
|
eval(input);
|
|
25
|
-
} catch (e) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
24
|
+
} catch (e) { return; }
|
|
28
25
|
|
|
29
26
|
$result.textContent = result;
|
|
30
27
|
|
|
@@ -51,4 +48,4 @@ window.addEventListener("keydown", function (e) {
|
|
|
51
48
|
}
|
|
52
49
|
});
|
|
53
50
|
editor.focus();
|
|
54
|
-
update();
|
|
51
|
+
update();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigma-playground",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "A web app to play with sigma.js graphs.",
|
|
5
5
|
"main": "index.html",
|
|
6
6
|
"scripts": {
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
"menu/",
|
|
39
39
|
"cli.js",
|
|
40
40
|
"index.js",
|
|
41
|
+
"index.d.ts",
|
|
41
42
|
"bloggify.js",
|
|
42
43
|
"bloggify.json",
|
|
43
44
|
"bloggify/"
|
|
44
45
|
]
|
|
45
|
-
}
|
|
46
|
+
}
|