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: 4156,
label: 'Nicolas Wolff',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo-du-30-09-2015-a-09.47-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=12
// 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: 231566,
label: 'COURSE: Structure et fonction des protéines',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/cours-structure-et-fonction-des-proteines/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156231566,
size: 0.5,
source: 4156,
target: 231566,
});
//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: 4149,
label: 'Célia Caillet-Saguy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-celia-caillet-saguy-img-20240421-203216-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/celia-caillet-saguy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2315664149,
size: 0.5,
source: 231566,
target: 4149 });
//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: 836,
label: 'Thierry Rose',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/Thierry_Rose-e1423234985507-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thierry-rose/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 231566836,
size: 0.5,
source: 231566,
target: 836 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2315664156,
size: 0.5,
source: 231566,
target: 4156 });
//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: 7063,
label: 'Monica Sala',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-monica-sala-research-pasteur-monica-sala-monicaphoto2020-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/monica-sala/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2315667063,
size: 0.5,
source: 231566,
target: 7063 });
//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: 7199,
label: 'Hervé Waxin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_herve-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/herve-waxin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2315667199,
size: 0.5,
source: 231566,
target: 7199 });
//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: 232303,
label: 'Sarah Michel-Anfray',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/sarah-michel-anfray/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 231566232303,
size: 0.5,
source: 231566,
target: 232303 });
//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: 90725,
label: 'Virginie Ponticelli',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/virginie-ponticelli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 23156690725,
size: 0.5,
source: 231566,
target: 90725 });
// 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: 206377,
label: 'PROJECT: HORIZON-MSCA-DN CLEXM Project',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/horizon-msca-dn-clexm-project/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156206377,
size: 0.5,
source: 4156,
target: 206377,
});
//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: 194626,
label: 'Johannes Groen',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/01/research_pasteur-foto-jan-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/johannes-groen/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206377194626,
size: 0.5,
source: 206377,
target: 194626 });
//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: 4237,
label: 'Jost Enninga',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_jost2015-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jost-enninga/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2063774237,
size: 0.5,
source: 206377,
target: 4237 });
//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: 1563,
label: 'Anna Sartori-Rupp',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/04/research_pasteur-foto-mia-cut-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anna-sartori-rupp/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2063771563,
size: 0.5,
source: 206377,
target: 1563 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2063774156,
size: 0.5,
source: 206377,
target: 4156 });
//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: 68441,
label: 'Anastasia Gazi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/08/research.pasteur.fr_adgaz-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anastasia-gazi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 20637768441,
size: 0.5,
source: 206377,
target: 68441 });
// 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: 168161,
label: 'COURSE: Biochimie des Protéines',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/biochimie-des-proteines-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156168161,
size: 0.5,
source: 4156,
target: 168161,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4149) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1681614149,
size: 0.5,
source: 168161,
target: 4149 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1681614156,
size: 0.5,
source: 168161,
target: 4156 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 836) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 168161836,
size: 0.5,
source: 168161,
target: 836 });
// 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: 162069,
label: 'EVENT: Internal Seminar Dept Neuroscience “Molecular organization and regulation of the Usher2 complex, a protein assembly related to deafness and blindness”, Nicolas Wolff',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/internal-seminar-dept-neuroscience-molecular-organization-and-regulation-of-the-usher2-complex-a-protein-assembly-related-to-deafness-and-blindness-nicolas-wolff/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156162069,
size: 0.5,
source: 4156,
target: 162069,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1620694156,
size: 0.5,
source: 162069,
target: 4156 });
// 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: 148381,
label: 'COURSE: Biochimie des Protéines',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/biochimie-des-proteines/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156148381,
size: 0.5,
source: 4156,
target: 148381,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4149) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1483814149,
size: 0.5,
source: 148381,
target: 4149 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 836) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 148381836,
size: 0.5,
source: 148381,
target: 836 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1483814156,
size: 0.5,
source: 148381,
target: 4156 });
// 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: 144475,
label: 'PROJECT: Identification of cellular PDZ-containing Proteins targeted by the virus SARS-Cov-2 during infection (PPCOVi)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/identification-of-cellular-pdz-containing-proteins-targeted-by-the-virus-sars-cov-2-during-infection-ppcovi/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156144475,
size: 0.5,
source: 4156,
target: 144475,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4149) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1444754149,
size: 0.5,
source: 144475,
target: 4149 });
//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: 4928,
label: 'Yves Jacob',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4928',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1444754928,
size: 0.5,
source: 144475,
target: 4928 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1444754156,
size: 0.5,
source: 144475,
target: 4156 });
// 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: 135102,
label: 'EVENT: DPT NEUROSCIENCE – Thesis defence : Mariano GENERA – Structural and functional study of the human phosphatase PTPN3 and its interaction with oncogenic viruses.',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/dpt-neuroscience-thesis-defence-mariano-genera/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156135102,
size: 0.5,
source: 4156,
target: 135102,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1351024156,
size: 0.5,
source: 135102,
target: 4156 });
//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: 3793,
label: 'Pierre-Jean Corringer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo_corringer-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-jean-corringer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1351023793,
size: 0.5,
source: 135102,
target: 3793 });
// 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: 103035,
label: 'PROJECT: Mutations in PDZ Binding Motif (PBM)-containing proteins associated to the Usher syndrome',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/mutations-pdz-binding-motif-pbm-containing-proteins-associated-usher-syndrome/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156103035,
size: 0.5,
source: 4156,
target: 103035,
});
//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: 4147,
label: 'Florence Cordier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/08/research_pasteur-photo_flo_2019.06.25a_crop-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/florence-cordier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1030354147,
size: 0.5,
source: 103035,
target: 4147 });
//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: 93342,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 10303593342,
size: 0.5,
source: 103035,
target: 93342 });
//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: 103007,
label: 'Baptiste Colcombet-Cazenave',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=103007',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 103035103007,
size: 0.5,
source: 103035,
target: 103007 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4149) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1030354149,
size: 0.5,
source: 103035,
target: 4149 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1030354156,
size: 0.5,
source: 103035,
target: 4156 });
// 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: 103020,
label: 'PROJECT: Rabies virus neuronal infection',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-fig2_modelerage-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/rabies-virus-neuronal-infection/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4156103020,
size: 0.5,
source: 4156,
target: 103020,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1030204156,
size: 0.5,
source: 103020,
target: 4156 });
// 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: 37995,
label: 'TOOL: Nuclear Magnetic Resonance spectrometers',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_20140327_115110-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/tool/nuclear-magnetic-resonance-spectrometers/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 415637995,
size: 0.5,
source: 4156,
target: 37995,
});
//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: 4160,
label: 'Ada Prochnicka-Chalufour',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_maphoto-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ada-prochnicka-chalufour/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 379954160,
size: 0.5,
source: 37995,
target: 4160 });
//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: 4146,
label: 'Muriel Delepierre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig6-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/muriel-delepierre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 379954146,
size: 0.5,
source: 37995,
target: 4146 });
//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: 4153,
label: 'Iñaki Guijarro',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/05/research_pasteur-photo4-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/inaki-guijarro/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 379954153,
size: 0.5,
source: 37995,
target: 4153 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4147) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 379954147,
size: 0.5,
source: 37995,
target: 4147 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 379954156,
size: 0.5,
source: 37995,
target: 4156 });
//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: 4148,
label: 'Nadia Izadi-Pruneyre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_photo_site-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nadia-izadi-pruneyre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 379954148,
size: 0.5,
source: 37995,
target: 4148 });
//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: 4158,
label: 'Bruno Vitorge',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_bruno_vitorge-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/bruno-vitorge/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 379954158,
size: 0.5,
source: 37995,
target: 4158 });
//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: 4161,
label: 'Catherine Simenel',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4161',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 379954161,
size: 0.5,
source: 37995,
target: 4161 });
// 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: 24256,
label: 'TEAM: Signalling and Molecular interactions',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_i05280-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/group-nicolas-wolff/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 415624256,
size: 0.5,
source: 4156,
target: 24256,
});
//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: 93330,
label: 'Mariano Genera',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/mariano-genera/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2425693330,
size: 0.5,
source: 24256,
target: 93330 });
//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: 168405,
label: 'Yasmine Achat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/yasmine-achat/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24256168405,
size: 0.5,
source: 24256,
target: 168405 });
//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: 154176,
label: 'Flavio Alvarez',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/flavio-alvarez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24256154176,
size: 0.5,
source: 24256,
target: 154176 });
//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: 192100,
label: 'Orso Subrini',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/orso-subrini/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24256192100,
size: 0.5,
source: 24256,
target: 192100 });
//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: 220748,
label: 'Clarice Marty',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/clarice-marty/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24256220748,
size: 0.5,
source: 24256,
target: 220748 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 242564156,
size: 0.5,
source: 24256,
target: 4156 });
// adding node
var x_node = Math.cos(2 * 11 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 11 * Math.PI / N) * 10;
g.nodes.push({
id: 86,
label: 'TEAM: Signaling and receptors dynamics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2014/09/research_pasteur-channel-receptors-bandeau-unite-pj-corringer-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/signaling-and-receptors-dynamics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 415686,
size: 0.5,
source: 4156,
target: 86,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4156) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 864156,
size: 0.5,
source: 86,
target: 4156 });
//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: 102089,
label: 'Marie Prevost',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/02/research_pasteur-profilepic-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-prevost/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86102089,
size: 0.5,
source: 86,
target: 102089 });
//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: 4196,
label: 'Gaël Moneron',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_gael-moneron2-e1442504490400-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gael-moneron/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 864196,
size: 0.5,
source: 86,
target: 4196 });
//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: 204741,
label: 'Catherine Venien-Bryan',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/catherine-venien-bryan/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86204741,
size: 0.5,
source: 86,
target: 204741 });
//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: 8432,
label: 'Nathalie Barilone',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/nathalie-barilone/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 868432,
size: 0.5,
source: 86,
target: 8432 });
//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: 8708,
label: 'Karima Medjebeur',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/karima-medjebeur/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 868708,
size: 0.5,
source: 86,
target: 8708 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 192100) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 86192100,
size: 0.5,
source: 86,
target: 192100 });
//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: 221612,
label: 'Zahra Marouf',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/zahra-marouf/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86221612,
size: 0.5,
source: 86,
target: 221612 });
//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: 161527,
label: 'Nour Awad',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/nour-awad/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86161527,
size: 0.5,
source: 86,
target: 161527 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 154176) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 86154176,
size: 0.5,
source: 86,
target: 154176 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 168405) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 86168405,
size: 0.5,
source: 86,
target: 168405 });
//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: 175836,
label: 'Andreas Zoumpoulakis',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/andreas-zoumpoulakis/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86175836,
size: 0.5,
source: 86,
target: 175836 });
//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: 175838,
label: 'Maria Vangelatou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/02/research_pasteur-maria-vangelatou-92350283-885252988568502-1704564789117714432-n-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/maria-vangelatou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86175838,
size: 0.5,
source: 86,
target: 175838 });
//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: 180527,
label: 'Korantin Le Mouël',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/korantin-le-mouel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86180527,
size: 0.5,
source: 86,
target: 180527 });
//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: 193301,
label: 'Matthieu Sèze',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/matthieu-seze/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86193301,
size: 0.5,
source: 86,
target: 193301 });
//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: 219567,
label: 'Laura Cardon',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/laura-cardon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86219567,
size: 0.5,
source: 86,
target: 219567 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 220748) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 86220748,
size: 0.5,
source: 86,
target: 220748 });
//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: 233147,
label: 'Antonio EL HELOU',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/10/research_pasteur-enantonio-el-heloufrantonio-el-helou-photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/antonio-el-helou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86233147,
size: 0.5,
source: 86,
target: 233147 });
//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: 217471,
label: 'Eric Figueroa Acosta',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/01/research_pasteur-eneric-figueroa-acostafreric-figueroa-acosta-research-pasteur-eneric-figueroa-acostafreric-figueroa-acosta-photo-ig-portrait-email-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eric-figueroa-acosta/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86217471,
size: 0.5,
source: 86,
target: 217471 });
//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: 235155,
label: 'Chloé ANGOLE',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/chloe-angole/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 86235155,
size: 0.5,
source: 86,
target: 235155 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3793) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 863793,
size: 0.5,
source: 86,
target: 3793 });
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) {
});