Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
8f3e328c
Commit
8f3e328c
authored
Jan 02, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] add black border around graph nodes
parent
9c39f34c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
Sigma.js
src/Gargantext/Hooks/Sigmax/Sigma.js
+24
-0
No files found.
src/Gargantext/Hooks/Sigmax/Sigma.js
View file @
8f3e328c
...
...
@@ -9,6 +9,30 @@ if (typeof window !== 'undefined') {
const
CustomShapes
=
require
(
'sigma/plugins/garg.js'
).
init
(
sigma
,
window
).
customShapes
;
require
(
'sigma/src/utils/sigma.utils.js'
).
init
(
sigma
);
// Black circle around a node
(
function
()
{
var
originalDef
=
sigma
.
canvas
.
nodes
.
def
;
sigma
.
canvas
.
nodes
.
def
=
(
node
,
context
,
settings
)
=>
{
var
prefix
=
settings
(
'prefix'
)
||
''
;
originalDef
(
node
,
context
,
settings
);
context
.
strokeStyle
=
'#000'
;
context
.
lineWidth
=
1
;
context
.
beginPath
();
context
.
arc
(
node
[
prefix
+
'x'
],
node
[
prefix
+
'y'
],
node
[
prefix
+
'size'
],
0
,
Math
.
PI
*
2
,
true
);
context
.
stroke
();
}
})()
sigma
.
canvas
.
nodes
.
selected
=
(
node
,
context
,
settings
)
=>
{
// hack
// We need to temporarily set node.type to 'def'. This is for 2 reasons
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment