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: 4374,
label: 'Jérôme Gros',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_yia-gros_01-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=11
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 156367,
label: 'NEWS: Highlights 2020',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/highlights-2020/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4374156367,
size: 0.5,
source: 4374,
target: 156367,
});
//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: 64150,
label: 'Laure Bally-Cuif',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/04/research.pasteur.fr_laure_bally-cuiff-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/laure-bally-cuif/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 15636764150,
size: 0.5,
source: 156367,
target: 64150 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1563674374,
size: 0.5,
source: 156367,
target: 4374 });
//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: 35226,
label: 'Germano Cecere',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_germano-photo-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/germano-cecere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 15636735226,
size: 0.5,
source: 156367,
target: 35226 });
//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: 4553,
label: 'Sigolène Meilhac',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-sigolene-meilhac-meilhac-sigolene-6578c-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sigolene-meilhac/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1563674553,
size: 0.5,
source: 156367,
target: 4553 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 6371,
label: 'Pauline Speder',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_dsc5160_2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pauline-speder/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1563676371,
size: 0.5,
source: 156367,
target: 6371 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4824,
label: 'François Schweisguth',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-fs3-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francois-schweisguth/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1563674824,
size: 0.5,
source: 156367,
target: 4824 });
//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: 4876,
label: 'Shahragim Tajbakhsh',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-shahragim-tajbakhsh-tajbakhsh-photo2024-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/shahragim-tajbakhsh/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1563674876,
size: 0.5,
source: 156367,
target: 4876 });
// 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: 117431,
label: 'EVENT: Developmental and Stem Cell Biology seminar by Dr. Edouard Hannezo, Institute of Science and Technology, Wien, Austria',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/developmental-and-stem-cell-biology-seminar-by-dr-edouard-hannezo-institute-of-science-and-technology-wien-austria/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4374117431,
size: 0.5,
source: 4374,
target: 117431,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1174314374,
size: 0.5,
source: 117431,
target: 4374 });
// 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: 108241,
label: 'EVENT: BDCS Department seminar by Professor Guillaume Charras, London Centre for Nanotechnology University College London',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/bdcs-department-seminar-by-professor-guillaume-charras-london-centre-for-nanotechnology-university-college-london/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4374108241,
size: 0.5,
source: 4374,
target: 108241,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1082414374,
size: 0.5,
source: 108241,
target: 4374 });
// 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: 89325,
label: 'EVENT: Of cavefish and cavemen. What can we learn from blind, fat fish to keep us healthy. By Nicolas Rohner, Stowers Institute for Medical Research, Kansas City, USA',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/of-cavefish-and-cavemen-what-can-we-learn-from-blind-fat-fish-to-keep-us-healthy-by-nicolas-rohner-stowers-institute-for-medical-research-kansas-city-usa/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437489325,
size: 0.5,
source: 4374,
target: 89325,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 893254374,
size: 0.5,
source: 89325,
target: 4374 });
// 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: 87269,
label: 'EVENT: SEMINAR ” Systems biology of vertebrate development ” by Patrick Müller',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/03/research.pasteur.fr_mueller_576586-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/event/seminar-systems-biology-of-vertebrate-development/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437487269,
size: 0.5,
source: 4374,
target: 87269,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 872694374,
size: 0.5,
source: 87269,
target: 4374 });
//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: 51517,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 8726951517,
size: 0.5,
source: 87269,
target: 51517 });
// 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: 46132,
label: 'PROJECT: Developing genomic and molecular genetic resources in quails to investigate dynamic morphogenesis in higher vertebrates.',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_afz03361-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/developing-genomic-and-molecular-genetic-resources-in-quails-to-investigate-dynamic-morphogenesis-in-higher-vertebrates/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437446132,
size: 0.5,
source: 4374,
target: 46132,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 461324374,
size: 0.5,
source: 46132,
target: 4374 });
//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: 47142,
label: 'Julian Roussel',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/julian-roussel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 4613247142,
size: 0.5,
source: 46132,
target: 47142 });
// 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: 46129,
label: 'PROJECT: HFSP- 2015- Mechanical control of progenitor cell renewal and differentiation during vertebrate limb formation',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_drop-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/hfsp-2015-mechanical-control-of-progenitor-cell-renewal-and-differentiation-during-vertebrate-limb-formation/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437446129,
size: 0.5,
source: 4374,
target: 46129,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 461294374,
size: 0.5,
source: 46129,
target: 4374 });
// 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: 46117,
label: 'PROJECT: ERC-2013-StG-LimbCellDynamics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_erc9-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/erc-2013-stg-limbcelldynamics/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437446117,
size: 0.5,
source: 4374,
target: 46117,
});
//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: 4377,
label: 'Chloé Moreau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_chloe-moreau-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/chloe-moreau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 461174377,
size: 0.5,
source: 46117,
target: 4377 });
//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: 4373,
label: 'Joao Firmino',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/joao-firmino/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 461174373,
size: 0.5,
source: 46117,
target: 4373 });
//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: 4378,
label: 'Didier Rocancourt',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/didier-rocancourt/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 461174378,
size: 0.5,
source: 46117,
target: 4378 });
//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: 4375,
label: 'Mehdi Saadaoui',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/mehdi-saadaoui/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 461174375,
size: 0.5,
source: 46117,
target: 4375 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 461174374,
size: 0.5,
source: 46117,
target: 4374 });
// 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: 21426,
label: 'PROGRAM_PROJECT: LabEx Revive – Regenerative biology & medicine',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_stem-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/program_project/revive/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437421426,
size: 0.5,
source: 4374,
target: 21426,
});
//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: 4729,
label: 'Marina Caillet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_marina-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marina-caillet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 214264729,
size: 0.5,
source: 21426,
target: 4729 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4876) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 214264876,
size: 0.5,
source: 21426,
target: 4876 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4824) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 214264824,
size: 0.5,
source: 21426,
target: 4824 });
//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: 4606,
label: 'Pablo Navarro Gil',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-institut-pasteur_portraits-studio_gcc_162-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pablo-navarro-gil/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 214264606,
size: 0.5,
source: 21426,
target: 4606 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 64150) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2142664150,
size: 0.5,
source: 21426,
target: 64150 });
//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: 193569,
label: 'Cecile Martinat (I-Stem, Evry)',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/epartner/cecile-martinat-i-stem-evry/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21426193569,
size: 0.5,
source: 21426,
target: 193569 });
//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: 194846,
label: 'Alice Jouneau (EPEE – INRAE)',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/epartner/alice-jouneau-embryo-and-pluripotency-epigenetic-and-environment-epee-inrae/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21426194846,
size: 0.5,
source: 21426,
target: 194846 });
//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: 194872,
label: 'Philippe Menasché (Inserm U970, APHP)',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/01/research_pasteur-menache-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/epartner/philippe-menasche-inserm-u970-hopital-europeen-georges-pompidou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21426194872,
size: 0.5,
source: 21426,
target: 194872 });
//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: 194886,
label: 'Raphael Scharfmann (Institut Cochin, Paris)',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/epartner/raphael-scharfmann-institut-cochin-paris/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21426194886,
size: 0.5,
source: 21426,
target: 194886 });
//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: 194902,
label: 'Frédéric Relaix (Institut Mondor de Recherche Biomédicale – IMRB)',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/01/research_pasteur-fred-relaix-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/epartner/frederic-relaix-institut-mondor-de-recherche-biomedicale-imrb/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21426194902,
size: 0.5,
source: 21426,
target: 194902 });
// 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: 18256,
label: 'PROJECT: Evo-Devo projects',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_python_wm1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/evo-devo-projects/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 437418256,
size: 0.5,
source: 4374,
target: 18256,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4378) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 182564378,
size: 0.5,
source: 18256,
target: 4378 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 182564374,
size: 0.5,
source: 18256,
target: 4374 });
// 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: 6108,
label: 'TEAM: Dynamic Regulation of Morphogenesis',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-unite-j-gros-29-07-19-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/dynamic-regulation-of-morphogenesis/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 43746108,
size: 0.5,
source: 4374,
target: 6108,
});
//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: 4484,
label: 'Olinda Alegria-Prevot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-capture-decran-2019-07-29-a-12.27.42-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/olinda-alegria-prevot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 61084484,
size: 0.5,
source: 6108,
target: 4484 });
//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: 125592,
label: 'Carolina Parada Borja',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-carolina-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/carolina-parada-borja/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108125592,
size: 0.5,
source: 6108,
target: 125592 });
//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: 125599,
label: 'Carole Phan',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-carole-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/carole-phan/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108125599,
size: 0.5,
source: 6108,
target: 125599 });
//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: 136134,
label: 'Arthur Michaut',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/12/research_pasteur-photo-arthur-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/arthur-michaut/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108136134,
size: 0.5,
source: 6108,
target: 136134 });
//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: 154942,
label: 'Aurélien Villedieu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/03/research_pasteur-aurelien-villedieu-photo-a.-villedieu-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/aurelien-villedieu/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108154942,
size: 0.5,
source: 6108,
target: 154942 });
//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: 136130,
label: 'Yu Ieda',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/12/research_pasteur-yu-ieda-yu-ieda-2021-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/yu-ieda/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108136130,
size: 0.5,
source: 6108,
target: 136130 });
//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: 166541,
label: 'Alexander Chamolly',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/09/research_pasteur-alex-chamolly-gp-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alexander-chamolly/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108166541,
size: 0.5,
source: 6108,
target: 166541 });
//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: 163287,
label: 'Tara Moheb',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/07/research_pasteur-tara-moheb-tara-moheb-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/tara-moheb/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108163287,
size: 0.5,
source: 6108,
target: 163287 });
//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: 213820,
label: 'Yeganeh Foroughijabbari',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/11/research_pasteur-enyeganeh-foroughijabbari-9e2b5dc6-6905-4df7-8101-a9b7835a1cda-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/yeganeh-foroughijabbari/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 6108213820,
size: 0.5,
source: 6108,
target: 213820 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4374) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 61084374,
size: 0.5,
source: 6108,
target: 4374 });
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) {
});