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: 81076,
label: 'Sandrine Fernandes Pellerin',
type: 'image',
url: '',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=11
// 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: 228824,
label: 'PROJECT: Étude de la réponse vaccinale induite par un vaccin vivant “IVORY1” (2023-048)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/ivory1/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076228824,
size: 0.5,
source: 81076,
target: 228824,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 22882481076,
size: 0.5,
source: 228824,
target: 81076 });
//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: 209482,
label: 'Aria Allahverdi',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/209482/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 228824209482,
size: 0.5,
source: 228824,
target: 209482 });
//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: 4723,
label: 'Jessica Quintin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_pasteurweb-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jessica-quintin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2288244723,
size: 0.5,
source: 228824,
target: 4723 });
//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: 8600,
label: 'Hélène Laude',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/10/research_pasteur-photo_helene_laude-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/helene-laude/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2288248600,
size: 0.5,
source: 228824,
target: 8600 });
//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: 8541,
label: 'Fabien Taieb',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_taieb-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabien-taieb/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2288248541,
size: 0.5,
source: 228824,
target: 8541 });
// 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: 225611,
label: 'PROJECT: Étude Observationnelle des Pathologies des voyageurs, EOP',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/eop/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076225611,
size: 0.5,
source: 81076,
target: 225611,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8541) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2256118541,
size: 0.5,
source: 225611,
target: 8541 });
//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: 79822,
label: 'Paul-Henri Consigny',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_capture-d’écran-2016-11-28-à-18.42.07-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/paul-henri-consigny/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 22561179822,
size: 0.5,
source: 225611,
target: 79822 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 22561181076,
size: 0.5,
source: 225611,
target: 81076 });
//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: 211463,
label: 'Julia ABAD',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/julia-abad/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 225611211463,
size: 0.5,
source: 225611,
target: 211463 });
//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: 147177,
label: 'Nastassia Tvardik',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/09/research_pasteur-nastassia-tvardik-research-p-e1607521913384-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/nastassia-tvardik/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 225611147177,
size: 0.5,
source: 225611,
target: 147177 });
// 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: 220245,
label: 'PROJECT: SUMMIT',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/summit/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076220245,
size: 0.5,
source: 81076,
target: 220245,
});
//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: 213207,
label: 'Oula Itani',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/oula-itani/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 220245213207,
size: 0.5,
source: 220245,
target: 213207 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8541) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2202458541,
size: 0.5,
source: 220245,
target: 8541 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 79822) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 22024579822,
size: 0.5,
source: 220245,
target: 79822 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 22024581076,
size: 0.5,
source: 220245,
target: 81076 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 211463) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 220245211463,
size: 0.5,
source: 220245,
target: 211463 });
// 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: 160090,
label: 'NEWS: CORSER4 : étude sur les personnes en cours de vaccination contre la COVID-19',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/vous-etes-en-cours-de-vaccination-contre-la-covid-19-participez-a-letude-corser4/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076160090,
size: 0.5,
source: 81076,
target: 160090,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8541) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1600908541,
size: 0.5,
source: 160090,
target: 8541 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 79822) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 16009079822,
size: 0.5,
source: 160090,
target: 79822 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 16009081076,
size: 0.5,
source: 160090,
target: 81076 });
//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: 55928,
label: 'Anaïs Perilhou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_photoap-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anais-perilhou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 16009055928,
size: 0.5,
source: 160090,
target: 55928 });
//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: 164220,
label: 'Yanis Dahoumane',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/yanis-dahoumane/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 160090164220,
size: 0.5,
source: 160090,
target: 164220 });
// 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: 200706,
label: 'PROJECT: COMPRESSED',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/compressed/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076200706,
size: 0.5,
source: 81076,
target: 200706,
});
//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: 170909,
label: 'Grégory Gérenton',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/11/research_pasteur-gregory-gerenton-gregory-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gregory-gerenton/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 200706170909,
size: 0.5,
source: 200706,
target: 170909 });
//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: 186361,
label: 'Paul Avan',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/paul-avan/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 200706186361,
size: 0.5,
source: 200706,
target: 186361 });
//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: 170221,
label: 'Céline Quinsac',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/11/research_pasteur-celine-quinsac-photo-quinsac-ida-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/celine-quinsac/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 200706170221,
size: 0.5,
source: 200706,
target: 170221 });
//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: 207583,
label: 'Laurent Orlando',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/207583/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 200706207583,
size: 0.5,
source: 200706,
target: 207583 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 20070681076,
size: 0.5,
source: 200706,
target: 81076 });
// 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: 178797,
label: 'NEWS: CORSER 5 : Etude de la réponse immunitaire chez des personnes en cours d’infection par le SARS-CoV-2',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/corser-5-etude-de-la-reponse-immunitaire-chez-des-personnes-en-cours-dinfection-par-le-sars-cov-2-3/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076178797,
size: 0.5,
source: 81076,
target: 178797,
});
//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: 2624,
label: 'Arnaud Fontanet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_arnaud-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/arnaud-fontanet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1787972624,
size: 0.5,
source: 178797,
target: 2624 });
//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: 176455,
label: 'Simon Galmiche',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/simon-galmiche/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 178797176455,
size: 0.5,
source: 178797,
target: 176455 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 17879781076,
size: 0.5,
source: 178797,
target: 81076 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 164220) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 178797164220,
size: 0.5,
source: 178797,
target: 164220 });
//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: 17879778192,
size: 0.5,
source: 178797,
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: 7885,
label: 'Cassandre Von Platen',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/02/research_pasteur-photo_cassandre.jpg',
page_url: 'https://research.pasteur.fr/en/member/cassandre-von-platen/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1787977885,
size: 0.5,
source: 178797,
target: 7885 });
//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: 7878,
label: 'Marie-Noelle Ungeheuer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_43070-e1437491181428-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-noelle-ungeheuer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1787977878,
size: 0.5,
source: 178797,
target: 7878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8600) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1787978600,
size: 0.5,
source: 178797,
target: 8600 });
//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: 4958,
label: 'Laurence Arowas',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-la-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laurence-arowas/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1787974958,
size: 0.5,
source: 178797,
target: 4958 });
//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: 167546,
label: 'Emmanuel Roux',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/emmanuel-roux/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 178797167546,
size: 0.5,
source: 178797,
target: 167546 });
//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: 154423,
label: 'Ayla Zayoud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/02/research_pasteur-ayla-zayoud-1604574096423-removebg-preview-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ayla-zayoud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 178797154423,
size: 0.5,
source: 178797,
target: 154423 });
// 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: 143699,
label: 'NEWS: Séro-épidémiologie du SARS-CoV-2 (études CORSER)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/06/research_pasteur-capture-decran-2020-06-19-a-14.45.41-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/news/sero-epidemiologie-du-sars-cov-2-etudes-corser/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076143699,
size: 0.5,
source: 81076,
target: 143699,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7878) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1436997878,
size: 0.5,
source: 143699,
target: 7878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2624) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1436992624,
size: 0.5,
source: 143699,
target: 2624 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 14369981076,
size: 0.5,
source: 143699,
target: 81076 });
//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: 121855,
label: 'Isabelle Cailleau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/04/research_pasteur-capture-decran-2019-04-09-a-17.09.03-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/isabelle-cailleau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 143699121855,
size: 0.5,
source: 143699,
target: 121855 });
//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: 7888,
label: 'Nathalie Jolly',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dsc7459_sqr-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nathalie-jolly/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1436997888,
size: 0.5,
source: 143699,
target: 7888 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7885) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1436997885,
size: 0.5,
source: 143699,
target: 7885 });
// 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: 159125,
label: 'PROJECT: Amélioration des pratiques d’informations et du recueil du consentement dans les recherches impliquant la personne humaine',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/amelioration-des-pratiques/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076159125,
size: 0.5,
source: 81076,
target: 159125,
});
//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: 49405,
label: 'Fanny Momboisse',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/06/research_pasteur-photo-pasteur-1.jpg',
page_url: 'https://research.pasteur.fr/en/member/fanny-momboisse/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 15912549405,
size: 0.5,
source: 159125,
target: 49405 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7885) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1591257885,
size: 0.5,
source: 159125,
target: 7885 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 15912581076,
size: 0.5,
source: 159125,
target: 81076 });
// 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: 158921,
label: 'NEWS: Vous pensez avoir eu deux épisodes de la Covid-19 ? Participez à l’étude CORSER2F !',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/vous-pensez-avoir-eu-deux-episodes-de-la-covid-19-participez-a-letude-corser/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076158921,
size: 0.5,
source: 81076,
target: 158921,
});
//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: 138050,
label: 'Bruno Hoen',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=138050',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 158921138050,
size: 0.5,
source: 158921,
target: 138050 });
//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: 153747,
label: 'Jérémie Leporrier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/jeremie-leporrier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 158921153747,
size: 0.5,
source: 158921,
target: 153747 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 15892181076,
size: 0.5,
source: 158921,
target: 81076 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7878) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1589217878,
size: 0.5,
source: 158921,
target: 7878 });
// adding node
var x_node = Math.cos(2 * 9 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 9 * Math.PI / N) * 10;
g.nodes.push({
id: 147702,
label: 'NEWS: Suivi de la persistance de la réponse immunitaire contre le SARS-CoV-2 au sein de la cohorte de Crépy-en-Valois (COVID-Oise)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/suivi-de-la-persistance-de-la-reponse-immunitaire-contre-le-sars-cov-2-au-sein-de-la-cohorte-de-crepy-en-valois-covid-oise/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 81076147702,
size: 0.5,
source: 81076,
target: 147702,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2624) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1477022624,
size: 0.5,
source: 147702,
target: 2624 });
//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: 145046,
label: 'Laurie Pinaud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/11/research_pasteur-1398451-10151989867577520-1823773709-o-e1604852006341-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laurie-pinaud-2/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 147702145046,
size: 0.5,
source: 147702,
target: 145046 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 14770281076,
size: 0.5,
source: 147702,
target: 81076 });
//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: 4267,
label: 'Laura Tondeur',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_research.pasteur.fr_tondeur-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laura-tondeur/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1477024267,
size: 0.5,
source: 147702,
target: 4267 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7888) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1477027888,
size: 0.5,
source: 147702,
target: 7888 });
//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: 4263,
label: 'Yoann Madec',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_madec-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/yoann-madec/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1477024263,
size: 0.5,
source: 147702,
target: 4263 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7878) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1477027878,
size: 0.5,
source: 147702,
target: 7878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 121855) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 147702121855,
size: 0.5,
source: 147702,
target: 121855 });
//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: 4920,
label: 'Sylvie van Der Werf',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/07/research_pasteur-photo_sylvie-vdw1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/sylvie-van-der-werf/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1477024920,
size: 0.5,
source: 147702,
target: 4920 });
// adding node
var x_node = Math.cos(2 * 10 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 10 * Math.PI / N) * 10;
g.nodes.push({
id: 26170,
label: 'TEAM: Clinical Research Coordination Office',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_institutpasteur_36110-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/clinical-core/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 8107626170,
size: 0.5,
source: 81076,
target: 26170,
});
//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: 4261,
label: 'Mohand Ait Ahmed',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/12/research_pasteur-mohand-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/mohand-ait-ahmed/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 261704261,
size: 0.5,
source: 26170,
target: 4261 });
//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: 109847,
label: 'Tan Phuc Buivan',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/04/research_pasteur-207372_10150131394389390_545773_n-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-tan-phuc-buivan/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 26170109847,
size: 0.5,
source: 26170,
target: 109847 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 78192) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2617078192,
size: 0.5,
source: 26170,
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: 26170118549,
size: 0.5,
source: 26170,
target: 118549 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 164220) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 26170164220,
size: 0.5,
source: 26170,
target: 164220 });
//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: 151219,
label: 'Hirumani De Silva',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/hirumani-de-silva/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 26170151219,
size: 0.5,
source: 26170,
target: 151219 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 81076) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2617081076,
size: 0.5,
source: 26170,
target: 81076 });
//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: 143206,
label: 'Souhir Neffati',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/06/research_pasteur-souhir-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/souhir-neffati/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 26170143206,
size: 0.5,
source: 26170,
target: 143206 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 207583) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 26170207583,
size: 0.5,
source: 26170,
target: 207583 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 55928) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2617055928,
size: 0.5,
source: 26170,
target: 55928 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7885) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 261707885,
size: 0.5,
source: 26170,
target: 7885 });
//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: 200933,
label: 'Magdalena Stroksztejn',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/magdalena-stroksztejn/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 26170200933,
size: 0.5,
source: 26170,
target: 200933 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 211463) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 26170211463,
size: 0.5,
source: 26170,
target: 211463 });
//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: 227818,
label: 'Françoise Banga',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/francoise-banga/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 26170227818,
size: 0.5,
source: 26170,
target: 227818 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 147177) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 26170147177,
size: 0.5,
source: 26170,
target: 147177 });
//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: 4380,
label: 'Lénaig Le Fouler',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/02/research.pasteur.fr_lle_fouler_photo-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/lenaig-le-fouler/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 261704380,
size: 0.5,
source: 26170,
target: 4380 });
//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: 230889,
label: 'Kosovare Kukleci',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/09/research_pasteur-enkosovare-kuklecifrkosovare-kukleci-capture-decran-2024-09-24-a-20.27.33-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/kosovare-kukleci/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 26170230889,
size: 0.5,
source: 26170,
target: 230889 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7888) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 261707888,
size: 0.5,
source: 26170,
target: 7888 });
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) {
});