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: 2489,
label: 'David DiGregorio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/03/david-protrait-2011-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=17
// 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: 197764,
label: 'EVENT: Neuroscience DPT seminar: Neuronal circuits for goal-directed sensorimotor learning',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/neuroscience-dpt-seminar-neuronal-circuits-for-goal-directed-sensorimotor-learning/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489197764,
size: 0.5,
source: 2489,
target: 197764,
});
//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: 144106,
label: 'Berat Semihcan Sermet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/07/research_pasteur-cv-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/berat-semihcan-sermet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 197764144106,
size: 0.5,
source: 197764,
target: 144106 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1977642489,
size: 0.5,
source: 197764,
target: 2489 });
// 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: 194963,
label: 'NEWS: Une théorie pour décrire les horloges cérébrales rapides',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/une-theorie-pour-decrire-les-horloges-cerebrales-rapides/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489194963,
size: 0.5,
source: 2489,
target: 194963,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1949632489,
size: 0.5,
source: 194963,
target: 2489 });
//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: 4194,
label: 'Alessandro Barri',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_img_05362-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alessandro-barri/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1949634194,
size: 0.5,
source: 194963,
target: 4194 });
// 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: 182603,
label: 'EVENT: Conférence-Débat “Cerveaux et Intelligence Artificielle”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/conference-debat-cerveaux-et-intelligence-artificielle/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489182603,
size: 0.5,
source: 2489,
target: 182603,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1826032489,
size: 0.5,
source: 182603,
target: 2489 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 50133,
label: 'Jean-Baptiste Masson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-jbm_photo_serieux_low_res-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-baptiste-masson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18260350133,
size: 0.5,
source: 182603,
target: 50133 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4977,
label: 'Christophe Zimmer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-christophe-zimmer-chz-photo-resized-bw-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christophe-zimmer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1826034977,
size: 0.5,
source: 182603,
target: 4977 });
//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: 154625,
label: 'Assunta Pelosi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/02/research_pasteur-assunta-pelosi-img-0066-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/assunta-pelosi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182603154625,
size: 0.5,
source: 182603,
target: 154625 });
// 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: 169563,
label: 'EVENT: Neuroscience Work in Progress – In vitro approach to study the neural dynamics underlying temporal learning',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/neuroscience-work-in-progress-in-vitro-approach-to-study-the-neural-dynamics-underlying-temporal-learning/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489169563,
size: 0.5,
source: 2489,
target: 169563,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1695632489,
size: 0.5,
source: 169563,
target: 2489 });
// 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: 152445,
label: 'PROJECT: Superresolution imaging of the diversity macromolecular organization at synapses',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/01/research_pasteur-superresolution-imaging-of-the-diversity-macromolecular-organization-at-synapses-thumbnail-sted-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/superresolution-imaging-of-synapses/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489152445,
size: 0.5,
source: 2489,
target: 152445,
});
//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: 1524454196,
size: 0.5,
source: 152445,
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: 133056,
label: 'Maureen Mc Fadden',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-maureen-mc-fadden-maureen-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/maureen-mc-fadden/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 152445133056,
size: 0.5,
source: 152445,
target: 133056 });
//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: 8678,
label: 'Cécile Saint Cloment',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/09/research.pasteur.fr_img_0527-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/cecile-saint-cloment/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1524458678,
size: 0.5,
source: 152445,
target: 8678 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1524452489,
size: 0.5,
source: 152445,
target: 2489 });
// 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: 152442,
label: 'PROJECT: Cerebellar circuit representation of precisely timed behaviors',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2014/09/research.pasteur.fr_dynamic-neuronal-imaging-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/cerebellar-circuit-representation-of-precisely-timed-behaviors/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489152442,
size: 0.5,
source: 2489,
target: 152442,
});
//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: 83238,
label: 'Zuzanna Piwkowska',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_zuzanna3_cropped-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/zuzanna-piwkowska/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 15244283238,
size: 0.5,
source: 152442,
target: 83238 });
//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: 110613,
label: 'Franziska Bender',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/06/research_pasteur-11d11sc00232-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/franziska-bender/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 152442110613,
size: 0.5,
source: 152442,
target: 110613 });
//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: 132995,
label: 'Miruna Costreie',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-miruna-costreie-photo-me-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/miruna-costreie/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 152442132995,
size: 0.5,
source: 152442,
target: 132995 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 144106) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 152442144106,
size: 0.5,
source: 152442,
target: 144106 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1524422489,
size: 0.5,
source: 152442,
target: 2489 });
// 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: 152440,
label: 'PROJECT: Statistical inference of synaptic and circuit models',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2014/09/research.pasteur.fr_dynamic-neuronal-imaging-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/synaptic-and-circuit-model-inference-for-statistical-analysis-of-neural-circuits/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489152440,
size: 0.5,
source: 2489,
target: 152440,
});
//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: 144112,
label: 'Giovanni Diana',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/07/research_pasteur-giovanni-diana-giovanni-kcl-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/giovanni-diana/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 152440144112,
size: 0.5,
source: 152440,
target: 144112 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4194) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1524404194,
size: 0.5,
source: 152440,
target: 4194 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1524402489,
size: 0.5,
source: 152440,
target: 2489 });
// 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: 152430,
label: 'PROJECT: Computational modeling of cerebellar cortical circuit dynamics with dynamic synapses',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/01/research_pasteur-computational-modeling-of-cerebellar-cortical-circuit-dynamics-with-dynamic-synapses-model-figure-thumbnail-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/computational-modeling-and-statistical-analysis-of-cerebellar-circuit-dynamics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489152430,
size: 0.5,
source: 2489,
target: 152430,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4194) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1524304194,
size: 0.5,
source: 152430,
target: 4194 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 144112) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 152430144112,
size: 0.5,
source: 152430,
target: 144112 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1524302489,
size: 0.5,
source: 152430,
target: 2489 });
// 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: 149511,
label: 'EVENT: Neuroscience Work In Progress “Neural data science: a probabilistic rendez-vous of theory and data”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/neuroscience-work-in-progress-neural-data-science-a-probabilistic-rendez-vous-of-theory-and-data-giovanni-diana/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489149511,
size: 0.5,
source: 2489,
target: 149511,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1495112489,
size: 0.5,
source: 149511,
target: 2489 });
// 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: 132832,
label: 'NEWS: Congratulations to PhD students',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/congratulations-to-phd-students/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489132832,
size: 0.5,
source: 2489,
target: 132832,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1328322489,
size: 0.5,
source: 132832,
target: 2489 });
// 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: 110422,
label: 'EVENT: Neural networks – From brains to machines and vice versa',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/neural-networks-from-brains-to-machines-and-vice-versa/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 2489110422,
size: 0.5,
source: 2489,
target: 110422,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1104222489,
size: 0.5,
source: 110422,
target: 2489 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 50133) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 11042250133,
size: 0.5,
source: 110422,
target: 50133 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 68280,
label: 'Archived: Christoph Schmidt-Hieber',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/04/research.pasteur.fr_headshot_800-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=68280',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11042268280,
size: 0.5,
source: 110422,
target: 68280 });
// 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: 89352,
label: 'EVENT: “Synapse identity: focus on complement-related proteins” – Pr Fekrije Selimi',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/synapse-identity-focus-on-complement-related-proteins-pr-selimi-fekrije/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 248989352,
size: 0.5,
source: 2489,
target: 89352,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 893522489,
size: 0.5,
source: 89352,
target: 2489 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3806,
label: 'Pierre-Marie Lledo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-pierre-marie-lledo-lledo-pierre-marie-6653-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-marie-lledo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 893523806,
size: 0.5,
source: 89352,
target: 3806 });
//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: 86249,
label: 'Anaïs Victoire',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/02/research_pasteur-anais-victoire-photo-didentite-2024-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anais-victoire/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 8935286249,
size: 0.5,
source: 89352,
target: 86249 });
// adding node
var x_node = Math.cos(2 * 12 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 12 * Math.PI / N) * 10;
g.nodes.push({
id: 82729,
label: 'PROJECT: Synaptic basis of multisensory information processing in the cerebellar cortex',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_multisensory-innervation-gc-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/synatpic-basis-of-multisensory-information-processing-in-the-cerebellar-cortex/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 248982729,
size: 0.5,
source: 2489,
target: 82729,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4194) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 827294194,
size: 0.5,
source: 82729,
target: 4194 });
//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: 4200,
label: 'Francisco José Urra Quiroz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_untitled-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francisco-jose-urra-quiroz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 827294200,
size: 0.5,
source: 82729,
target: 4200 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 144106) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 82729144106,
size: 0.5,
source: 82729,
target: 144106 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 110613) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 82729110613,
size: 0.5,
source: 82729,
target: 110613 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 827292489,
size: 0.5,
source: 82729,
target: 2489 });
// adding node
var x_node = Math.cos(2 * 13 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 13 * Math.PI / N) * 10;
g.nodes.push({
id: 82679,
label: 'PROJECT: Dendritic computations',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_slider6a-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/dendritic-computations/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 248982679,
size: 0.5,
source: 2489,
target: 82679,
});
//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: 8680,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 826798680,
size: 0.5,
source: 82679,
target: 8680 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 133056) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 82679133056,
size: 0.5,
source: 82679,
target: 133056 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 826792489,
size: 0.5,
source: 82679,
target: 2489 });
// adding node
var x_node = Math.cos(2 * 14 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 14 * Math.PI / N) * 10;
g.nodes.push({
id: 70654,
label: 'TEAM: Decision and Bayesian Computation – Epiméthée',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/decision-and-bayesian-computation/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 248970654,
size: 0.5,
source: 2489,
target: 70654,
});
//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: 85997,
label: 'Christian L. Vestergaard',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/04/research.pasteur.fr_photopasteur-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-christian-vestergaard/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 7065485997,
size: 0.5,
source: 70654,
target: 85997 });
//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: 80014,
label: 'François Laurent',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research_pasteur-francois-laurent-moi-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francois-laurent/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 7065480014,
size: 0.5,
source: 70654,
target: 80014 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 104637,
label: 'Frédérique Bouchot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-frederique-bouchot-2-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/frederique-bouchot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654104637,
size: 0.5,
source: 70654,
target: 104637 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 191233,
label: 'Alex Barbier–Chebbah',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/11/research_pasteur-alex-barbier-chebbah-research-pasteur-alex-barbier-chebbah-photo5-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alex-barbier-chebbah/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654191233,
size: 0.5,
source: 70654,
target: 191233 });
//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: 229418,
label: 'Astrid Nilsson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/08/research_pasteur-enastrid-nilssonfrastrid-nilson-photo-moi-ok-cropped-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/astrid-nilsson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654229418,
size: 0.5,
source: 70654,
target: 229418 });
//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: 164842,
label: 'Alexis Bénichou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/08/research_pasteur-alexis-benichou-photo-prairie-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/alexis-benichou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654164842,
size: 0.5,
source: 70654,
target: 164842 });
//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: 220035,
label: 'Zografoula Vagena',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/02/research_pasteur-enzografoula-vagenafrzografoula-vagena-screenshot-2024-08-12-at-22.37.58-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/zografoula-vagena/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654220035,
size: 0.5,
source: 70654,
target: 220035 });
//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: 164837,
label: 'Alexandre Blanc',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/08/research_pasteur-alexandre-blanc-me-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alexandre-blanc/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654164837,
size: 0.5,
source: 70654,
target: 164837 });
//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: 155894,
label: 'Francesca Raimondi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/03/research_pasteur-francesca-raimondi-img-1371-002-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/francesca-raimundi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654155894,
size: 0.5,
source: 70654,
target: 155894 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 191231,
label: 'Robin Cremese',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/11/research_pasteur-robin-cremese-research-pasteur-robin-cremese-screenshot-2024-02-13-at-00.26.29-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/robin-cremese/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654191231,
size: 0.5,
source: 70654,
target: 191231 });
//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: 229422,
label: 'Eleonore Bouchereau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/08/research_pasteur-eneleonore-bouchereaufreleonore-bouchereau-research-pasteur-eneleonore-bouchereaufreleonore-bouchereau-screenshot-2024-08-12-at-22.36.03-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eleonore-bouchereau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654229422,
size: 0.5,
source: 70654,
target: 229422 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 220019,
label: 'Iwan Quemada',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/02/research_pasteur-eniwan-quemadafriwan-quemada-inria-0474-185-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/iwan-quemada/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 70654220019,
size: 0.5,
source: 70654,
target: 220019 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 706542489,
size: 0.5,
source: 70654,
target: 2489 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 50133) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 7065450133,
size: 0.5,
source: 70654,
target: 50133 });
// adding node
var x_node = Math.cos(2 * 15 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 15 * Math.PI / N) * 10;
g.nodes.push({
id: 65235,
label: 'NEWS: Fluorescence Microscopy Workshop on cutting-edge technologies symposium',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_schwartz_david_lab09_1812-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/news/fluorescence-microscopy-workshop-on-cutting-edge-technologies-symposium/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 248965235,
size: 0.5,
source: 2489,
target: 65235,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 652352489,
size: 0.5,
source: 65235,
target: 2489 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4196) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 652354196,
size: 0.5,
source: 65235,
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: 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: 652354237,
size: 0.5,
source: 65235,
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: 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: 652357199,
size: 0.5,
source: 65235,
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: 4571,
label: 'Thierry Lang',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_thierry-new-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thierry-lang/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 652354571,
size: 0.5,
source: 65235,
target: 4571 });
// adding node
var x_node = Math.cos(2 * 16 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 16 * Math.PI / N) * 10;
g.nodes.push({
id: 20065,
label: 'PROJECT: Molecular mechanisms of synaptic diversity',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_dynamic-neuronal-imaging-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/dynamic-neuronal-imaging__trashed/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 248920065,
size: 0.5,
source: 2489,
target: 20065,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2489) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 200652489,
size: 0.5,
source: 20065,
target: 2489 });
//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: 8679,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 200658679,
size: 0.5,
source: 20065,
target: 8679 });
//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: 4197,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 200654197,
size: 0.5,
source: 20065,
target: 4197 });
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) {
});