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: 58598,
label: 'Evolutionary Bioinformatics',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_evol_bioinfo_banner-1-150x150.png',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
N=8
var x_node = Math.cos(2 * 0 * Math.PI / N) * 2;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 2;
var biggest_node_size = 0;
//check if content already exist
x_site = Math.cos(2 * 0 * Math.PI / N) * 2;
y_site = Math.sin(2 * 0 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 57758,
label: 'Frédéric Lemoine',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research_pasteur-frederic-lemoine-lemoine-frederic-26-small-crop-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/frederic-lemoine/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 5859857758,
size: 0.5,
source: 58598,
target: 57758 });
//check if content already exist
x_site = Math.cos(2 * 1 * Math.PI / N) * 2;
y_site = Math.sin(2 * 1 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 57911,
label: 'Anna Zhukova',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-anna_msc-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anna-zhukova/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 5859857911,
size: 0.5,
source: 58598,
target: 57911 });
//check if content already exist
x_site = Math.cos(2 * 2 * Math.PI / N) * 2;
y_site = Math.sin(2 * 2 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 89881,
label: 'Mathieu Moslonka-Lefebvre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-photo_portrait_mml-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/mathieu-moslonka-lefebvre/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 5859889881,
size: 0.5,
source: 58598,
target: 89881 });
//check if content already exist
x_site = Math.cos(2 * 3 * Math.PI / N) * 2;
y_site = Math.sin(2 * 3 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 107092,
label: 'Marie Morel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-index-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/marie-morel/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 58598107092,
size: 0.5,
source: 58598,
target: 107092 });
//check if content already exist
x_site = Math.cos(2 * 4 * Math.PI / N) * 2;
y_site = Math.sin(2 * 4 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 104949,
label: 'Mélanie Ridel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/04/research_pasteur-zhqmk3fvz5qjzrvh-c5ijvianpy-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/melanie-ridel/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 58598104949,
size: 0.5,
source: 58598,
target: 104949 });
//check if content already exist
x_site = Math.cos(2 * 5 * Math.PI / N) * 2;
y_site = Math.sin(2 * 5 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 108151,
label: 'Luc Blassel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-portrait_cropped-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/luc-blassel/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 58598108151,
size: 0.5,
source: 58598,
target: 108151 });
//check if content already exist
x_site = Math.cos(2 * 6 * Math.PI / N) * 2;
y_site = Math.sin(2 * 6 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 73628,
label: 'Jakub Voznica',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_jakubvoznica-132x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jakub-voznica/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 5859873628,
size: 0.5,
source: 58598,
target: 73628 });
//check if content already exist
x_site = Math.cos(2 * 7 * Math.PI / N) * 2;
y_site = Math.sin(2 * 7 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 2879,
label: 'Olivier Gascuel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_pasteurolivierg_crop21-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivier-gascuel/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 585982879,
size: 0.5,
source: 58598,
target: 2879 });
// update positions
x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
N=18
// 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: 111404,
label: 'COURSE: INTRODUCTION À LA PHYLOGÉNIE MOLÉCULAIRE : CONCEPTS, METHODES ET OUTILS',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/course/introduction-a-la-phylogenie-moleculaire-concepts-methodes-et-outils/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598111404,
size: 0.5,
source: 58598,
target: 111404 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1114042879,
size: 0.5,
source: 111404,
target: 2879 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11140457758,
size: 0.5,
source: 111404,
target: 57758 });
//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: 37634,
label: 'Julien Guglielmini',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_julien-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/julien-guglielmini/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 11140437634,
size: 0.5,
source: 111404,
target: 37634 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11140457911,
size: 0.5,
source: 111404,
target: 57911 });
//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: 7759,
label: 'Alexis Criscuolo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_alexiscriscuolo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alexis-criscuolo/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1114047759,
size: 0.5,
source: 111404,
target: 7759 });
//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: 7769,
label: 'Catherine Dauga',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig34-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/catherine-dauga/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1114047769,
size: 0.5,
source: 111404,
target: 7769 });
// 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: 110958,
label: 'SOFTWARE: Goalign/Gotree',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-gotree_logo-5-150x150.png',
page_url: 'https://research.pasteur.fr/en/software/goalign-gotree/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598110958,
size: 0.5,
source: 58598,
target: 110958 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11095857758,
size: 0.5,
source: 110958,
target: 57758 });
// 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: 110943,
label: 'SOFTWARE: NGPhylogeny.fr',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-genie-3-150x150.png',
page_url: 'https://research.pasteur.fr/en/software/ngphylogeny-fr/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598110943,
size: 0.5,
source: 58598,
target: 110943 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11094357758,
size: 0.5,
source: 110943,
target: 57758 });
//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: 58603,
label: 'Damien Correia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/09/research.pasteur.fr_damien-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/damien-correia/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 11094358603,
size: 0.5,
source: 110943,
target: 58603 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1109432879,
size: 0.5,
source: 110943,
target: 2879 });
// 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: 110929,
label: 'SOFTWARE: PastML',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-logo-6-150x150.png',
page_url: 'https://research.pasteur.fr/en/software/pastml/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598110929,
size: 0.5,
source: 58598,
target: 110929 });
//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: 66434,
label: 'Sohta Ishikawa',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_11872030_945324228840022_4673190415949995508_o-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sohta-ishikawa/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 11092966434,
size: 0.5,
source: 110929,
target: 66434 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11092957911,
size: 0.5,
source: 110929,
target: 57911 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1109292879,
size: 0.5,
source: 110929,
target: 2879 });
// 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: 110925,
label: 'SOFTWARE: Booster',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-logo-8-150x150.png',
page_url: 'https://research.pasteur.fr/en/software/booster/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598110925,
size: 0.5,
source: 58598,
target: 110925 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11092557758,
size: 0.5,
source: 110925,
target: 57758 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1109252879,
size: 0.5,
source: 110925,
target: 2879 });
// 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: 110833,
label: 'PROJECT: The phylodynamics of partner notification and contact tracing in HIV epidemics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-pn-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/the-phylodynamics-of-partner-notification-and-contact-tracing-in-hiv-epidemics/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598110833,
size: 0.5,
source: 58598,
target: 110833 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 89881) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11083389881,
size: 0.5,
source: 110833,
target: 89881 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11083357911,
size: 0.5,
source: 110833,
target: 57911 });
//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: 89878,
label: 'Miraine Davila Felipe',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-profile-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/miraine-davila-felipe/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 11083389878,
size: 0.5,
source: 110833,
target: 89878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 73628) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 11083373628,
size: 0.5,
source: 110833,
target: 73628 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1108332879,
size: 0.5,
source: 110833,
target: 2879 });
// 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: 109975,
label: 'COURSE: C3BI Course: Introduction to Molecular Phylogenetics – Hong Kong 2018',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-phylogenetics_course_hong_kong_2018-150x150.png',
page_url: 'https://research.pasteur.fr/en/course/c3bi-courses-introduction-to-molecular-phylogenetics-hong-kong-2018/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598109975,
size: 0.5,
source: 58598,
target: 109975 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1099752879,
size: 0.5,
source: 109975,
target: 2879 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10997557911,
size: 0.5,
source: 109975,
target: 57911 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10997557758,
size: 0.5,
source: 109975,
target: 57758 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 37634) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10997537634,
size: 0.5,
source: 109975,
target: 37634 });
//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: 110816,
label: 'Sebastian Duchene',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-sebastian-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/sebastian-duchene/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 109975110816,
size: 0.5,
source: 109975,
target: 110816 });
// 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: 109592,
label: 'PROJECT: Renewing Felsenstein’s phylogenetic bootstrap.',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/renewing-felsensteins-phylogenetic-bootstrap/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598109592,
size: 0.5,
source: 58598,
target: 109592 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10959257758,
size: 0.5,
source: 109592,
target: 57758 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 89878) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10959289878,
size: 0.5,
source: 109592,
target: 89878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 58603) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10959258603,
size: 0.5,
source: 109592,
target: 58603 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1095922879,
size: 0.5,
source: 109592,
target: 2879 });
// 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: 108832,
label: 'PROJECT: PastML: A Fast Likelihood Method to Reconstruct and Visualize Ancestral Scenarios',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-logo-4-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/pastml-a-fast-likelihood-method-to-reconstruct-and-visualize-ancestral-scenarios/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598108832,
size: 0.5,
source: 58598,
target: 108832 });
// 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: 107098,
label: 'EVENT: MCEB 2018',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/mceb-2018/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 58598107098,
size: 0.5,
source: 58598,
target: 107098 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1070982879,
size: 0.5,
source: 107098,
target: 2879 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10709857911,
size: 0.5,
source: 107098,
target: 57911 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10709857758,
size: 0.5,
source: 107098,
target: 57758 });
// 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: 89856,
label: 'EVENT: MCEB 2017',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/mceb-2017/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859889856,
size: 0.5,
source: 58598,
target: 89856 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 898562879,
size: 0.5,
source: 89856,
target: 2879 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 8985657758,
size: 0.5,
source: 89856,
target: 57758 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 8985657911,
size: 0.5,
source: 89856,
target: 57911 });
// 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: 77916,
label: 'PROGRAM_PROJECT: INCEPTION – Institut Convergence for the study of Emergence of Pathology Through Individuals and Populations',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/10/research.pasteur.fr_inception-program-institut-convergence-for-the-study-of-emergence-of-pathology-through-individuals-and-populations-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/program_project/inception/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859877916,
size: 0.5,
source: 58598,
target: 77916 });
//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: 779164729,
size: 0.5,
source: 77916,
target: 4729 });
//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/06/research.pasteur.fr_chzphoto-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: 779164977,
size: 0.5,
source: 77916,
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: 7063,
label: 'Monica Sala',
type: 'image',
url: '',
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: 779167063,
size: 0.5,
source: 77916,
target: 7063 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 779162879,
size: 0.5,
source: 77916,
target: 2879 });
//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: 3770,
label: 'Thomas Bourgeron',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_thomas-bourgeron-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-bourgeron/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779163770,
size: 0.5,
source: 77916,
target: 3770 });
//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: 4684,
label: 'Eduardo Rocha',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_eduardo_rocha-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eduardo-rocha/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779164684,
size: 0.5,
source: 77916,
target: 4684 });
//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: 4275,
label: 'Tamara Giles-Vernick',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dsc6500-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/tamara-giles-vernick/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779164275,
size: 0.5,
source: 77916,
target: 4275 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 2624,
label: 'Arnaud Fontanet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_arnaud-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/arnaud-fontanet/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779162624,
size: 0.5,
source: 77916,
target: 2624 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4715,
label: 'Lluis Quintana-Murci',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_quintana_photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lluis-quintana-murci/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779164715,
size: 0.5,
source: 77916,
target: 4715 });
//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: 4028,
label: 'Simon Cauchemez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig45-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/simon-cauchemez/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779164028,
size: 0.5,
source: 77916,
target: 4028 });
//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: 4365,
label: 'Marie-Lise Gougeon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_marie-lise-gougeon-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-lise-gougeon/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779164365,
size: 0.5,
source: 77916,
target: 4365 });
//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: 4623,
label: 'Michael Nilges',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/02/research.pasteur.fr_dsc3513-copy-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/michael-nilges/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779164623,
size: 0.5,
source: 77916,
target: 4623 });
//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: 388,
label: 'Jean-Christophe Olivo-Marin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/04/research_pasteur-photojcom_2016_2-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/jean-christophe-olivo-marin/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 77916388,
size: 0.5,
source: 77916,
target: 388 });
//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/2015/06/research.pasteur.fr_pnavarrofinal_-_bw-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: 779164606,
size: 0.5,
source: 77916,
target: 4606 });
//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: 6816,
label: 'Clementine Schilte',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_photo-clem-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/clementine-schilte/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 779166816,
size: 0.5,
source: 77916,
target: 6816 });
// 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: 78178,
label: 'PROJECT: Modelling the emergence and transmission of HIV-1 drug resistance mutations',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-logo-5-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/modelling-the-emergence-and-transmission-of-hiv-1-drug-resistance-mutations-in-the-uk/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859878178,
size: 0.5,
source: 58598,
target: 78178 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 7817857911,
size: 0.5,
source: 78178,
target: 57911 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 781782879,
size: 0.5,
source: 78178,
target: 2879 });
// 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: 78180,
label: 'EVENT: MCEB 2016',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/mceb-2016/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859878180,
size: 0.5,
source: 58598,
target: 78180 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 781802879,
size: 0.5,
source: 78180,
target: 2879 });
// 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: 78165,
label: 'PROJECT: Virogenesis',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-vg_logo-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/virogenesis/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859878165,
size: 0.5,
source: 58598,
target: 78165 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 7816557758,
size: 0.5,
source: 78165,
target: 57758 });
//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: 110790,
label: 'Kristof Theys',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/08/research_pasteur-img_3741-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/kristof-theys/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 78165110790,
size: 0.5,
source: 78165,
target: 110790 });
//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: 89884,
label: 'Tomochika Fujisawa',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/tomochika-fujisawa/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 7816589884,
size: 0.5,
source: 78165,
target: 89884 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 66434) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 7816566434,
size: 0.5,
source: 78165,
target: 66434 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57911) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 7816557911,
size: 0.5,
source: 78165,
target: 57911 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 781652879,
size: 0.5,
source: 78165,
target: 2879 });
// 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: 63876,
label: 'PROJECT: Phylogeny.fr',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/07/research_pasteur-genie-3-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/phylogeny-fr/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859863876,
size: 0.5,
source: 58598,
target: 63876 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 58603) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 6387658603,
size: 0.5,
source: 63876,
target: 58603 });
//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: 6823,
label: 'Olivia Doppelt-Azeroual',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/09/research.pasteur.fr_olivia-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivia-doppelt-azeroual/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 638766823,
size: 0.5,
source: 63876,
target: 6823 });
//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: 6830,
label: 'Fabien Mareuil',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_imag0560_1_2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabien-mareuil/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 638766830,
size: 0.5,
source: 63876,
target: 6830 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 57758) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 6387657758,
size: 0.5,
source: 63876,
target: 57758 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 638762879,
size: 0.5,
source: 63876,
target: 2879 });
// 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: 2462,
label: 'CENTER: Center of Bioinformatics, Biostatistics and Integrative Biology',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/03/Facebook-offers-its-Proxygen-server-on-Open-Source-Platform-for-developers-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/center/c3bi/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 585982462,
size: 0.5,
source: 58598,
target: 2462 });
//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: 4415,
label: 'Christophe Malabat',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_img_08311-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christophe-malabat/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24624415,
size: 0.5,
source: 2462,
target: 4415 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 104949) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 2462104949,
size: 0.5,
source: 2462,
target: 104949 });
//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: 7770,
label: 'Antonio V. Borderia',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_aborderia-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/antonio-borderia/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24627770,
size: 0.5,
source: 2462,
target: 7770 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4729) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 24624729,
size: 0.5,
source: 2462,
target: 4729 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2879) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 24622879,
size: 0.5,
source: 2462,
target: 2879 });
//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: 103385,
label: 'Angèle Bénard',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-picture-ab35-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/angele-benard/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 2462103385,
size: 0.5,
source: 2462,
target: 103385 });
//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: 906,
label: 'Marie-Agnès Dillies',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-photomadillies2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-agnes-dillies/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 2462906,
size: 0.5,
source: 2462,
target: 906 });
//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: 4138,
label: 'Marc Delarue',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_marc2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marc-delarue/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24624138,
size: 0.5,
source: 2462,
target: 4138 });
//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: 4541,
label: 'Didier Mazel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_didier_mazel-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/didier-mazel/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24624541,
size: 0.5,
source: 2462,
target: 4541 });
//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: 73392,
label: 'Claudine Médigue',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_claudinemedigue-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/emember/claudine-medigue/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 246273392,
size: 0.5,
source: 2462,
target: 73392 });
//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: 4913,
label: 'Patrick Trieu-Cuot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_photo_p_trieu_cuot_aout01-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/patrick-trieu-cuot/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24624913,
size: 0.5,
source: 2462,
target: 4913 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4723,
label: 'Jessica Quintin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_pasteurweb-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jessica-quintin/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24624723,
size: 0.5,
source: 2462,
target: 4723 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4821,
label: 'Olivier Schwartz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo-o.schwartz-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivier-schwartz/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 24624821,
size: 0.5,
source: 2462,
target: 4821 });
// adding node
var x_node = Math.cos(2 * 17 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 17 * Math.PI / N) * 10;
g.nodes.push({
id: 28,
label: 'DEPARTMENT: Genomes and Genetics',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_genome-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/department/genomes-genetics/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 5859828,
size: 0.5,
source: 58598,
target: 28 });
//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: 7044,
label: 'Isabelle Dulieu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_isabel2013-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/isabelle-dulieu/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 287044,
size: 0.5,
source: 28,
target: 7044 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4541) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 58598) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 284541,
size: 0.5,
source: 28,
target: 4541 });
//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: 4407,
label: 'Micheline Fromont-Racine',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_photos_mfr-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/micheline-fromont-racine/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 284407,
size: 0.5,
source: 28,
target: 4407 });
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: 12,
maxNodeSize: 30,
mouseWheelEnabled: false,
font: 'Montserrat',
labelThreshold:25,
borderSize:1,
defaultNodeBorderColor: '#333',
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;
//console.log(n.id);
//console.log(s.graph.nodes(n.id));
});
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) {
});