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: 4488,
label: 'Mariana Alonso',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_foto-website-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=9
// 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: 230997,
label: 'PROJECT: Lithium mechanisms of action (LiMact)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/lithium-mechanisms-of-action-limact/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4488230997,
size: 0.5,
source: 4488,
target: 230997,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2309974488,
size: 0.5,
source: 230997,
target: 4488 });
// 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: 230612,
label: 'TEAM: Emotional circuits',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/emotional-circuits/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4488230612,
size: 0.5,
source: 4488,
target: 230612,
});
//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: 197745,
label: 'Claire-Hélène de Badts',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/claire-helene-de-badts/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 230612197745,
size: 0.5,
source: 230612,
target: 197745 });
//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: 220019,
label: 'Iwan Quemada',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/02/research_pasteur-eniwan-quemadafriwan-quemada-inria-0474-185-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/iwan-quemada/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 230612220019,
size: 0.5,
source: 230612,
target: 220019 });
//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: 99390,
label: 'Mathilde Bigot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/05/research_pasteur-afterlightimage-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/mathilde-bigot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 23061299390,
size: 0.5,
source: 230612,
target: 99390 });
//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: 37097,
label: 'Chantal Henry',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_capture-d’écran-2015-09-18-à-18.07.01-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/chantal-henry/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 23061237097,
size: 0.5,
source: 230612,
target: 37097 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2306124488,
size: 0.5,
source: 230612,
target: 4488 });
// 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: 208296,
label: 'PROJECT: Translational study of the neural circuits underlying the negative emotional biases of depressive disorders and their response to ketamine',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/translational-study-of-the-neural-circuits-underlying-the-negative-emotional-biases-of-depressive-disorders-and-their-response-to-ketamine/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4488208296,
size: 0.5,
source: 4488,
target: 208296,
});
//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: 3806,
label: 'Pierre-Marie Lledo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-pierre-marie-lledo-lledo-pierre-marie-6653-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-marie-lledo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2082963806,
size: 0.5,
source: 208296,
target: 3806 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 99390) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 20829699390,
size: 0.5,
source: 208296,
target: 99390 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 197745) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 208296197745,
size: 0.5,
source: 208296,
target: 197745 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2082964488,
size: 0.5,
source: 208296,
target: 4488 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 37097) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 20829637097,
size: 0.5,
source: 208296,
target: 37097 });
// 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: 208257,
label: 'PROJECT: Effect of mood states on neural connectome',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/effect-of-mood-states-on-neural-connectome/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4488208257,
size: 0.5,
source: 4488,
target: 208257,
});
//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: 50133,
label: 'Jean-Baptiste Masson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-jbm_photo_serieux_low_res-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-baptiste-masson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 20825750133,
size: 0.5,
source: 208257,
target: 50133 });
//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: 1581,
label: 'Jean-Yves Tinevez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/JYT-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-yves-tinevez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2082571581,
size: 0.5,
source: 208257,
target: 1581 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 220019) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 208257220019,
size: 0.5,
source: 208257,
target: 220019 });
//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: 191231,
label: 'Robin Cremese',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/11/research_pasteur-robin-cremese-research-pasteur-robin-cremese-screenshot-2024-02-13-at-00.26.29-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/robin-cremese/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 208257191231,
size: 0.5,
source: 208257,
target: 191231 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2082574488,
size: 0.5,
source: 208257,
target: 4488 });
// 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: 20929,
label: 'PROJECT: Adult neurogenesis and brain plasticity',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_a-model-system-to-study-adult-neurogenesis1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/a-model-system-to-study-adult-neurogenesis/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 448820929,
size: 0.5,
source: 4488,
target: 20929,
});
//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: 4225,
label: 'Gérard Eberl',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_eberl-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gerard-eberl/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294225,
size: 0.5,
source: 20929,
target: 4225 });
//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: 4355,
label: 'Ivo Gomperts Boneca',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-ivo-gomperts-boneca-p9090188-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ivo-gomperts-boneca/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294355,
size: 0.5,
source: 20929,
target: 4355 });
//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: 4987,
label: 'Chiara Zurzolo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/11/research_pasteur-chiara-zurzolo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/chiara-zurzolo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294987,
size: 0.5,
source: 20929,
target: 4987 });
//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: 6382,
label: 'Fabrice Chretien',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_sans-titre1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabrice-chretien/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209296382,
size: 0.5,
source: 20929,
target: 6382 });
//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: 209293768,
size: 0.5,
source: 20929,
target: 3768 });
//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: 6371,
label: 'Pauline Speder',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_dsc5160_2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pauline-speder/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209296371,
size: 0.5,
source: 20929,
target: 6371 });
//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: 4489,
label: 'Françoise Lazarini-Serandour',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_francoise-lazarini-serandour-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francoise-lazarini-serandour/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294489,
size: 0.5,
source: 20929,
target: 4489 });
//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: 26499,
label: 'Rebecca Matsas',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/riip_member/rebecca-matsas/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2092926499,
size: 0.5,
source: 20929,
target: 26499 });
//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: 4490,
label: 'Gabriel Lepousez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_gabriel-lepousez1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/gabriel-lepousez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294490,
size: 0.5,
source: 20929,
target: 4490 });
//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: 4495,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294495,
size: 0.5,
source: 20929,
target: 4495 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 209294488,
size: 0.5,
source: 20929,
target: 4488 });
//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: 8476,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209298476,
size: 0.5,
source: 20929,
target: 8476 });
//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: 4180,
label: 'James Di Santo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_photojd-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/james-di-santo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294180,
size: 0.5,
source: 20929,
target: 4180 });
//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: 4487,
label: 'Antoine Nissant',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_img_6385-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/antoine-nissant/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 209294487,
size: 0.5,
source: 20929,
target: 4487 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3806) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 209293806,
size: 0.5,
source: 20929,
target: 3806 });
// 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: 58992,
label: 'COURSE: Development and Plasticty of the Nervous System',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/development-and-plasticty-of-the-nervous-system/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 448858992,
size: 0.5,
source: 4488,
target: 58992,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3806) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 589923806,
size: 0.5,
source: 58992,
target: 3806 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 589924488,
size: 0.5,
source: 58992,
target: 4488 });
//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: 589923964,
size: 0.5,
source: 58992,
target: 3964 });
// 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: 24942,
label: 'PROJECT: Affective dimension of sensory representation',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_capture-d’écran-2015-07-17-à-20.16.23-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/affective-dimension-of-sensory-representation/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 448824942,
size: 0.5,
source: 4488,
target: 24942,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4490) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249424490,
size: 0.5,
source: 24942,
target: 4490 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4495) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249424495,
size: 0.5,
source: 24942,
target: 4495 });
//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: 4492,
label: 'Kurt Sailor',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_kurt-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/kurt-sailor/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249424492,
size: 0.5,
source: 24942,
target: 4492 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249424488,
size: 0.5,
source: 24942,
target: 4488 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4487) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249424487,
size: 0.5,
source: 24942,
target: 4487 });
//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: 4485,
label: 'Gilles Gheusi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_ggheusi-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gilles-gheusi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249424485,
size: 0.5,
source: 24942,
target: 4485 });
//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: 4499,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249424499,
size: 0.5,
source: 24942,
target: 4499 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8476) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249428476,
size: 0.5,
source: 24942,
target: 8476 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3806) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249423806,
size: 0.5,
source: 24942,
target: 3806 });
// 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: 24934,
label: 'PROJECT: When Gut Bacteria Changes Brain Functions',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_microbebrain-01-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/how-gut-microbiota-could-change-our-brain/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 448824934,
size: 0.5,
source: 4488,
target: 24934,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4490) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249344490,
size: 0.5,
source: 24934,
target: 4490 });
//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: 4500,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344500,
size: 0.5,
source: 24934,
target: 4500 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249344488,
size: 0.5,
source: 24934,
target: 4488 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4485) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249344485,
size: 0.5,
source: 24934,
target: 4485 });
//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: 4523,
label: 'Morgane Besson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/07/research_pasteur-capture-decran-2017-07-22-a-17.21.36-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/morgane-besson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344523,
size: 0.5,
source: 24934,
target: 4523 });
//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: 4222,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344222,
size: 0.5,
source: 24934,
target: 4222 });
//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: 4481,
label: 'Laetitia Travier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-img_2309rognee-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laetitia-travier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344481,
size: 0.5,
source: 24934,
target: 4481 });
//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: 4360,
label: 'Richard Wheeler',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_photo-for-lab-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/richard-wheeler/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344360,
size: 0.5,
source: 24934,
target: 4360 });
//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: 79478,
label: 'Ilana Gabanyi',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=79478',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2493479478,
size: 0.5,
source: 24934,
target: 79478 });
//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: 79465,
label: 'Maud Pascal',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_maud-12116-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/maud-pascal/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2493479465,
size: 0.5,
source: 24934,
target: 79465 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3806) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249343806,
size: 0.5,
source: 24934,
target: 3806 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4225) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249344225,
size: 0.5,
source: 24934,
target: 4225 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4355) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 249344355,
size: 0.5,
source: 24934,
target: 4355 });
//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: 4337,
label: 'Jean-Marc Ghigo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-ghigo-jean-marc-recad.lg_-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-marc-ghigo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344337,
size: 0.5,
source: 24934,
target: 4337 });
//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: 4470,
label: 'Marc Lecuit',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-sans-titre-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marc-lecuit/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 249344470,
size: 0.5,
source: 24934,
target: 4470 });
// adding node
var x_node = Math.cos(2 * 8 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 8 * Math.PI / N) * 10;
g.nodes.push({
id: 6202,
label: 'TEAM: Perception & Action',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_chen_stemcells_6-2013-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/perception-and-action/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 44886202,
size: 0.5,
source: 4488,
target: 6202,
});
//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: 104637,
label: 'Frédérique Bouchot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-frederique-bouchot-2-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/frederique-bouchot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202104637,
size: 0.5,
source: 6202,
target: 104637 });
//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: 982,
label: 'Carine Moigneu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/Moigneu1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/carine-moigneu/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202982,
size: 0.5,
source: 6202,
target: 982 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4488) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62024488,
size: 0.5,
source: 6202,
target: 4488 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62024489,
size: 0.5,
source: 6202,
target: 4489 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 37097) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 620237097,
size: 0.5,
source: 6202,
target: 37097 });
//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: 60986,
label: 'Lida Katsimpardi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/03/research_pasteur-dsc1996-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lida-katsimpardi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 620260986,
size: 0.5,
source: 6202,
target: 60986 });
//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: 179542,
label: 'Léa Hamon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/04/research_pasteur-lea-hamon-lea-hamon-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lea-hamon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202179542,
size: 0.5,
source: 6202,
target: 179542 });
//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: 156464,
label: 'Alice Dupin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/03/research_pasteur-alice-dupin-247345641-382313933681837-173136756349216491-n-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alice-dupin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202156464,
size: 0.5,
source: 6202,
target: 156464 });
//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: 179550,
label: 'Soumia Abdellaoui',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/04/research_pasteur-soumia-abdellaoui-screenshot-2022-04-19-22-59-17-44-965bbf4d18d205f782c6b8409c5773a42-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/soumia-abdellaoui/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202179550,
size: 0.5,
source: 6202,
target: 179550 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 99390) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 620299390,
size: 0.5,
source: 6202,
target: 99390 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 79465) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 620279465,
size: 0.5,
source: 6202,
target: 79465 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4487) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62024487,
size: 0.5,
source: 6202,
target: 4487 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4485) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62024485,
size: 0.5,
source: 6202,
target: 4485 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4490) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62024490,
size: 0.5,
source: 6202,
target: 4490 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4492) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62024492,
size: 0.5,
source: 6202,
target: 4492 });
//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: 4496,
label: 'Sébastien Wagner',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/sebastien-wagner/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 62024496,
size: 0.5,
source: 6202,
target: 4496 });
//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: 7134,
label: 'Pierre Legrain',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-pierre-legrain-photo-2016-web-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-legrain/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 62027134,
size: 0.5,
source: 6202,
target: 7134 });
//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: 156471,
label: 'Alain Letailleur',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/03/research_pasteur-alain-letailleur-alain-letailleur-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alain-letailleur/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202156471,
size: 0.5,
source: 6202,
target: 156471 });
//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: 8676,
label: 'Tarek Sharshar',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_img_20151120_154248-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/tarek-sharshar/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 62028676,
size: 0.5,
source: 6202,
target: 8676 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 197745) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 6202197745,
size: 0.5,
source: 6202,
target: 197745 });
//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: 197754,
label: 'Mihye Song',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/02/research_pasteur-mihye-song-2022--01-e1695289680675-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/mihye-song/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202197754,
size: 0.5,
source: 6202,
target: 197754 });
//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: 197759,
label: 'Aurélien Mazeraud',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/aurelien-mazeraud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202197759,
size: 0.5,
source: 6202,
target: 197759 });
//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: 105067,
label: 'Anne-Cecile Petit',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-anne-cecile-petit-img-9675-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/anne-cecile-petit/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202105067,
size: 0.5,
source: 6202,
target: 105067 });
//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: 191696,
label: 'Justus Ninnemann',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/12/research_pasteur-justus-ninnemann-sans-titre-2-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/justus-ninnemann/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6202191696,
size: 0.5,
source: 6202,
target: 191696 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3806) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 62023806,
size: 0.5,
source: 6202,
target: 3806 });
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) {
});