GUIDE
- Left-click and drag the background to move the graph
- Left-click and drag the nodes to reorganize
- Left-click a node to view first level connections
- Double left-click a node to navigate to its page
- Double left-click the background to zoom in
- Right-click the background to zoom out
sigma.utils.pkg('sigma.canvas.nodes');
sigma.canvas.nodes.image = (function() {
var _cache = {},
_loading = {},
_callbacks = {};
// Return the renderer itself:
var renderer = function(node, context, settings) {
var args = arguments,
prefix = settings('prefix') || '',
size = node[prefix + 'size'],
color = node.color || settings('defaultNodeColor'),
url = node.url;
if (_cache[url]) {
context.save();
// Draw the clipping disc:
context.beginPath();
context.arc(
node[prefix + 'x'],
node[prefix + 'y'],
node[prefix + 'size'],
0,
Math.PI * 2,
true
);
context.closePath();
context.clip();
// Draw the image
context.drawImage(
_cache[url],
node[prefix + 'x'] - size,
node[prefix + 'y'] - size,
2 * size,
2 * size
);
// Quit the "clipping mode":
context.restore();
// Draw the border:
context.beginPath();
context.arc(
node[prefix + 'x'],
node[prefix + 'y'],
node[prefix + 'size'],
0,
Math.PI * 2,
true
);
context.lineWidth = 1;
context.strokeStyle = node.color || settings('defaultNodeColor');
context.stroke();
} else {
sigma.canvas.nodes.image.cache(url);
sigma.canvas.nodes.def.apply(
sigma.canvas.nodes,
args
);
}
};
// Let's add a public method to cache images, to make it possible to
// preload images before the initial rendering:
renderer.cache = function(url, callback) {
if (callback)
_callbacks[url] = callback;
if (_loading[url])
return;
var img = new Image();
img.onload = function() {
_loading[url] = false;
_cache[url] = img;
if (_callbacks[url]) {
_callbacks[url].call(this, img);
delete _callbacks[url];
}
};
_loading[url] = true;
img.src = url;
};
return renderer;
})();
var i,
s,
o,
offset_left = 0.5,
N = 1,
E = 40,
C = 5,
d = 0.5,
cs = [],
g = {
nodes: [],
edges: []
};
if (!sigma.classes.graph.hasMethod('neighbors')){
sigma.classes.graph.addMethod('neighbors', function(nodeId) {
var k,
neighbors = {},
index = this.allNeighborsIndex[nodeId] || {};
for (k in index)
neighbors[k] = this.nodesIndex[k];
return neighbors;
});
}
//adding the central node
g.nodes.push({
id: 101504,
label: 'Claire Leblond',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-2015_claire_portrait-1-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=8
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 182036,
label: 'PROJECT: Étude des facteurs génétiques impliqués dans l’autisme et les troubles apparentés (projet “C07/C16”)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/fr-genes-et-autisme/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 101504182036,
size: 0.5,
source: 101504,
target: 182036,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3770,
label: 'Thomas Bourgeron',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_thomas-bourgeron-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-bourgeron/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1820363770,
size: 0.5,
source: 182036,
target: 3770 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 156840,
label: 'Anna Maruani',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/anna-maruani/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182036156840,
size: 0.5,
source: 182036,
target: 156840 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 182036101504,
size: 0.5,
source: 182036,
target: 101504 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3960,
label: 'Alexandre Mathieu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_mathieua-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/alexandre-mathieu/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1820363960,
size: 0.5,
source: 182036,
target: 3960 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 24536,
label: 'Freddy Cliquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-17637047_1396080250451325_800557458960161845_o-2-e1519724213254-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/freddy-cliquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18203624536,
size: 0.5,
source: 182036,
target: 24536 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3967,
label: 'Thomas Rolland',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo_tr_small2-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-rolland/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1820363967,
size: 0.5,
source: 182036,
target: 3967 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8362,
label: 'Nathalie Lemiere',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_lemiere-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/nathalie-lemiere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1820368362,
size: 0.5,
source: 182036,
target: 8362 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 156728,
label: 'Chloé Lehoucq',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/04/research_pasteur-chloe-lehoucq-photo-cl-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/chloe-lehoucq/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182036156728,
size: 0.5,
source: 182036,
target: 156728 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8360,
label: 'Richard Delorme',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_delorme-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/richard-delorme/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1820368360,
size: 0.5,
source: 182036,
target: 8360 });
// adding node
var x_node = Math.cos(2 * 1 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 1 * Math.PI / N) * 10;
g.nodes.push({
id: 178578,
label: 'TOOL: GeneTrek',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/tool/genetrek/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 101504178578,
size: 0.5,
source: 101504,
target: 178578,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4405,
label: 'Simon Malesys',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-pasteur-profile-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/simon-malesys/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1785784405,
size: 0.5,
source: 178578,
target: 4405 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 178578101504,
size: 0.5,
source: 178578,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1785783967,
size: 0.5,
source: 178578,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1785783770,
size: 0.5,
source: 178578,
target: 3770 });
// adding node
var x_node = Math.cos(2 * 2 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 2 * Math.PI / N) * 10;
g.nodes.push({
id: 143260,
label: 'PROJECT: PARIS: Paris Autism Research International Sib-Pair Study',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/06/research_pasteur-paris-paris-autism-research-international-sib-pair-study-research.pasteur.fr-grant-fig1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/paris-paris-autism-research-international-study/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 101504143260,
size: 0.5,
source: 101504,
target: 143260,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432603960,
size: 0.5,
source: 143260,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 14326024536,
size: 0.5,
source: 143260,
target: 24536 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 143260101504,
size: 0.5,
source: 143260,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432603967,
size: 0.5,
source: 143260,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432608360,
size: 0.5,
source: 143260,
target: 8360 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3965,
label: 'Guillaume Dumas',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=3965',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432603965,
size: 0.5,
source: 143260,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3968,
label: 'Roberto Toro',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_toror-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/roberto-toro/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1432603968,
size: 0.5,
source: 143260,
target: 3968 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4405) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432604405,
size: 0.5,
source: 143260,
target: 4405 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432608362,
size: 0.5,
source: 143260,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156840) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 143260156840,
size: 0.5,
source: 143260,
target: 156840 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1432603770,
size: 0.5,
source: 143260,
target: 3770 });
// adding node
var x_node = Math.cos(2 * 3 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 3 * Math.PI / N) * 10;
g.nodes.push({
id: 104018,
label: 'PROJECT: EU-AIMS',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-iu-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/project/eu-aims/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 101504104018,
size: 0.5,
source: 101504,
target: 104018,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 10401824536,
size: 0.5,
source: 104018,
target: 24536 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183965,
size: 0.5,
source: 104018,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 101501,
label: 'Julien Fumey',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-fumey-julien-10-e1528383655738-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/julien-fumey/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 104018101501,
size: 0.5,
source: 104018,
target: 101501 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 97066,
label: 'Yang-Min Kim',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=97066',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10401897066,
size: 0.5,
source: 104018,
target: 97066 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 104018101504,
size: 0.5,
source: 104018,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4405) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040184405,
size: 0.5,
source: 104018,
target: 4405 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183960,
size: 0.5,
source: 104018,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183967,
size: 0.5,
source: 104018,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040188362,
size: 0.5,
source: 104018,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040188360,
size: 0.5,
source: 104018,
target: 8360 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 78192,
label: 'Olivia Chény',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_dsc0616mod2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivia-cheny/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10401878192,
size: 0.5,
source: 104018,
target: 78192 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 118549,
label: 'Nathalie Clément',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/12/research_pasteur-nathalie-clement-clement-nathalie-9576-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-nathalie-clement/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 104018118549,
size: 0.5,
source: 104018,
target: 118549 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1040183770,
size: 0.5,
source: 104018,
target: 3770 });
// adding node
var x_node = Math.cos(2 * 4 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 4 * Math.PI / N) * 10;
g.nodes.push({
id: 24414,
label: 'PROJECT: Background on the genetics of ASD',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_synapseasd-2-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/synaptic-genes-and-asd-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 10150424414,
size: 0.5,
source: 101504,
target: 24414,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143770,
size: 0.5,
source: 24414,
target: 3770 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3969,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143969,
size: 0.5,
source: 24414,
target: 3969 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2441424536,
size: 0.5,
source: 24414,
target: 24536 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3964,
label: 'Isabelle Cloëz-Tayarani',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-photo-i.-cloez-tayarani-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/isabelle-cloez-tayarani/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143964,
size: 0.5,
source: 24414,
target: 3964 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143965,
size: 0.5,
source: 24414,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3962,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143962,
size: 0.5,
source: 24414,
target: 3962 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3966,
label: 'Allain-Thibeault Ferhat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=3966',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143966,
size: 0.5,
source: 24414,
target: 3966 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3973,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 244143973,
size: 0.5,
source: 24414,
target: 3973 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143960,
size: 0.5,
source: 24414,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143967,
size: 0.5,
source: 24414,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3968) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244143968,
size: 0.5,
source: 24414,
target: 3968 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 56155,
label: 'Aline Vitrac',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=56155',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2441456155,
size: 0.5,
source: 24414,
target: 56155 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101501) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24414101501,
size: 0.5,
source: 24414,
target: 101501 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24414101504,
size: 0.5,
source: 24414,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 97066) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2441497066,
size: 0.5,
source: 24414,
target: 97066 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244148362,
size: 0.5,
source: 24414,
target: 8362 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 156871,
label: 'Myriam Rachid',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/myriam-rachid/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24414156871,
size: 0.5,
source: 24414,
target: 156871 });
// adding node
var x_node = Math.cos(2 * 5 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 5 * Math.PI / N) * 10;
g.nodes.push({
id: 65348,
label: 'PROJECT: Phelan-McDermid Syndrome: from mechanisms to treatments',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_22q13-140x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/phelan-mcdermid-syndrome-from-mechanisms-to-treatments/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 10150465348,
size: 0.5,
source: 101504,
target: 65348,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8358,
label: 'Anne Claude Tabet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_tabetac-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/anne-claude-tabet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 653488358,
size: 0.5,
source: 65348,
target: 8358 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653488360,
size: 0.5,
source: 65348,
target: 8360 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483960,
size: 0.5,
source: 65348,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483967,
size: 0.5,
source: 65348,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3964) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483964,
size: 0.5,
source: 65348,
target: 3964 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3966) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483966,
size: 0.5,
source: 65348,
target: 3966 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653488362,
size: 0.5,
source: 65348,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3968) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483968,
size: 0.5,
source: 65348,
target: 3968 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483965,
size: 0.5,
source: 65348,
target: 3965 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 24427,
label: 'Anita Beggiato',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_beggiato-150x150.png',
page_url: 'https://research.pasteur.fr/en/epartner/anita-beggiato/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6534824427,
size: 0.5,
source: 65348,
target: 24427 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 24429,
label: 'Frédérique Amsellem',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_frederique_amsellem-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/epartner/frederique-amsellem/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6534824429,
size: 0.5,
source: 65348,
target: 24429 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 65348101504,
size: 0.5,
source: 65348,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156840) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 65348156840,
size: 0.5,
source: 65348,
target: 156840 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156871) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 65348156871,
size: 0.5,
source: 65348,
target: 156871 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 653483770,
size: 0.5,
source: 65348,
target: 3770 });
// adding node
var x_node = Math.cos(2 * 6 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 6 * Math.PI / N) * 10;
g.nodes.push({
id: 24410,
label: 'PROJECT: The serotonin-NAS-melatonin pathway and susceptibility to ASD',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_melatonin-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/the-serotonin-nas-melatonin-pathway-and-susceptibility-to-asd-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 10150424410,
size: 0.5,
source: 101504,
target: 24410,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103770,
size: 0.5,
source: 24410,
target: 3770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3973) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103973,
size: 0.5,
source: 24410,
target: 3973 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103967,
size: 0.5,
source: 24410,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3965) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103965,
size: 0.5,
source: 24410,
target: 3965 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244108362,
size: 0.5,
source: 24410,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 244103960,
size: 0.5,
source: 24410,
target: 3960 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24410101504,
size: 0.5,
source: 24410,
target: 101504 });
// adding node
var x_node = Math.cos(2 * 7 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 7 * Math.PI / N) * 10;
g.nodes.push({
id: 36,
label: 'TEAM: Human Genetics and Cognitive Functions',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_32050-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/human-genetics-and-cognitive-functions/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 10150436,
size: 0.5,
source: 101504,
target: 36,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 178933,
label: 'Anaël Ayrolles',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/anael-ayrolles/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36178933,
size: 0.5,
source: 36,
target: 178933 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 196028,
label: 'Eli Barthome',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/eli-barthome/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36196028,
size: 0.5,
source: 36,
target: 196028 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 207775,
label: 'Aria Batut',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/aria-batut/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36207775,
size: 0.5,
source: 36,
target: 207775 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 24536) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 3624536,
size: 0.5,
source: 36,
target: 24536 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8350,
label: 'Sabrina Coqueran',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_coqueran-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/sabrina-coqueran/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368350,
size: 0.5,
source: 36,
target: 8350 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 196069,
label: 'Sophie Dauzet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/02/research_pasteur-sophie-dauzet-photo-sophie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sophie-dauzet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36196069,
size: 0.5,
source: 36,
target: 196069 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3768,
label: 'Fabrice de Chaumont',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_fabrice-de-chaumont-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabrice-de-chaumont/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 363768,
size: 0.5,
source: 36,
target: 3768 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8360) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 368360,
size: 0.5,
source: 36,
target: 8360 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 119254,
label: 'Benjamin Devauchelle',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/03/research_pasteur-capture-decran-2019-03-01-a-14.34.49-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/fr-benjamin-devauchelle/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36119254,
size: 0.5,
source: 36,
target: 119254 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 209349,
label: 'Mathis Fleury',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/mathis-fleury/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36209349,
size: 0.5,
source: 36,
target: 209349 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4525,
label: 'Benoît Forget',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_picturebencv-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/benoit-forget/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 364525,
size: 0.5,
source: 36,
target: 4525 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 101504) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 36101504,
size: 0.5,
source: 36,
target: 101504 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156728) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 36156728,
size: 0.5,
source: 36,
target: 156728 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8362) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 368362,
size: 0.5,
source: 36,
target: 8362 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 156840) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 36156840,
size: 0.5,
source: 36,
target: 156840 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3960) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 363960,
size: 0.5,
source: 36,
target: 3960 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 212408,
label: 'Zakaria Mougin',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/zakaria-mougin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36212408,
size: 0.5,
source: 36,
target: 212408 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 221240,
label: 'Manon Moreau',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/manon-moreau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 36221240,
size: 0.5,
source: 36,
target: 221240 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3967) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 363967,
size: 0.5,
source: 36,
target: 3967 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8358) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 368358,
size: 0.5,
source: 36,
target: 8358 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4668,
label: 'Elisabeth Verpy',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/elisabeth-verpy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 364668,
size: 0.5,
source: 36,
target: 4668 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3770) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 363770,
size: 0.5,
source: 36,
target: 3770 });
var s = new sigma({
//container: document.getElementById('graph-main'),
graph: g,
renderer: {
// IMPORTANT:
// This works only with the canvas renderer, so the
// renderer type set as "canvas" is necessary here.
container: document.getElementById('graph-main'),
type: 'canvas'
},
settings: {
minNodeSize: 6,
maxNodeSize: 35,
mouseWheelEnabled: false,
font: 'Montserrat',
labelThreshold:25,
borderSize:1,
defaultNodeBorderColor: '#999',
sideMargin:25,
}
});
// We first need to save the original colors of our
// nodes and edges, like this:
s.graph.nodes().forEach(function(n) {
n.originalColor = n.color;
});
s.graph.edges().forEach(function(e) {
e.originalColor = e.color;
});
// When a node is clicked, we check for each node
// if it is a neighbor of the clicked one. If not,
// we set its color as grey, and else, it takes its
// original color.
// We do the same for the edges, and we only keep
// edges that have both extremities colored.
s.bind('clickNode', function(e) {
var nodeId = e.data.node.id,
toKeep = s.graph.neighbors(nodeId);
toKeep[nodeId] = e.data.node;
s.graph.nodes().forEach(function(n) {
if (toKeep[n.id])
n.color = '#35a9f5';
else
n.color = '#dddddd';
});
s.graph.edges().forEach(function(e) {
if (toKeep[e.source] && toKeep[e.target])
e.color = '#35a9f5';
else
e.color = '#dddddd';
});
// Since the data has been modified, we need to
// call the refresh method to make the colors
// update effective.
s.refresh();
});
// When the stage is clicked, we just color each
// node and edge with its original color.
s.bind('clickStage', function(e) {
s.graph.nodes().forEach(function(n) {
n.color = n.originalColor;
});
s.graph.edges().forEach(function(e) {
e.color = e.originalColor;
});
// Same as in the previous event:
s.refresh();
});
s.bind("doubleClickNode", function (e) {
$("#canvas-wrap, .sigma-scene, .sigma-mouse").val();
ajax_load_page( e.data.node.page_url );
});
var c = s.camera;
s.bind("rightClickStage", function (e) {
sigma.misc.animation.camera(c, {
ratio: c.ratio * c.settings('zoomingRatio')
}, {
duration: 200
});
});
// Configure the noverlap layout:
var noverlapListener = s.configNoverlap({
nodeMargin: 10,
scaleNodes: 0.3,
gridSize: 1,
easing: 'quadraticInOut', // animation transition function
duration: 4000 // animation duration. Long here for the purposes of this example only
});
// Bind the events:
noverlapListener.bind('start stop interpolate', function(e) {
//console.log(e.type);
if(e.type === 'start') {
//console.time('noverlap');
}
if(e.type === 'interpolate') {
//console.timeEnd('noverlap');
}
});
// Start the layout:
s.startNoverlap();
//s.refresh();
// Initialize the dragNodes plugin:
var dragListener = sigma.plugins.dragNodes(s, s.renderers[0]);
dragListener.bind('startdrag', function(event) {
});
dragListener.bind('drag', function(event) {
});
dragListener.bind('drop', function(event) {
});
dragListener.bind('dragend', function(event) {
});