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: 4052,
label: 'Francesca Di Nunzio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/01/research_pasteur-dscf1697-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=14
// 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: 218540,
label: 'PROJECT: Etude du mécanisme de persistance à l’état latent du virus de l’immunodéficience humaine dénommé « condensat » : NEWVIRBIO (2023-036)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/etude-du-mecanisme-de-persistance-a-letat-latent-du-virus-de-limmunodeficience-humaine-denomme-condensat-newvirbio-2023-036/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052218540,
size: 0.5,
source: 4052,
target: 218540,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2185404052,
size: 0.5,
source: 218540,
target: 4052 });
// 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: 216549,
label: 'EVENT: Group de Reflexion SIDA (GRS) seminar: “New insights in the regulation of HIV expression and latency”',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/10/research_pasteur-grs-logo-3-square-150x150.png',
page_url: 'https://research.pasteur.fr/en/event/group-de-reflexion-sida-grs-seminar-new-insights-in-the-regulation-of-hiv-expression-and-latency/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052216549,
size: 0.5,
source: 4052,
target: 216549,
});
//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: 4053,
label: 'Marc Lavigne',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/marc-lavigne/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2165494053,
size: 0.5,
source: 216549,
target: 4053 });
//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: 3931,
label: 'Lisa Chakrabarti',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_lc2-photo-medium-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lisa-chakrabarti/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2165493931,
size: 0.5,
source: 216549,
target: 3931 });
//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: 4818,
label: 'Nicoletta Casartelli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/06/research_pasteur-682135-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nicoletta-casartelli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2165494818,
size: 0.5,
source: 216549,
target: 4818 });
//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: 4575,
label: 'Hugo Mouquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/05/research_pasteur-mouquet_id-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/hugo-mouquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2165494575,
size: 0.5,
source: 216549,
target: 4575 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2165494052,
size: 0.5,
source: 216549,
target: 4052 });
// 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: 210810,
label: 'EVENT: Groupe de Réflexion SIDA (GRS) meeting: “HIV sensing, nuclear import, and latency”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/groupe-de-reflexion-sida-grs-meeting-hiv-sensing-nuclear-import-and-latency/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052210810,
size: 0.5,
source: 4052,
target: 210810,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2108104052,
size: 0.5,
source: 210810,
target: 4052 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2108103931,
size: 0.5,
source: 210810,
target: 3931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4575) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2108104575,
size: 0.5,
source: 210810,
target: 4575 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4818) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2108104818,
size: 0.5,
source: 210810,
target: 4818 });
// 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: 201873,
label: 'EVENT: 40 years of HIV science',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/40-years-of-hiv-science/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052201873,
size: 0.5,
source: 4052,
target: 201873,
});
//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: 4107,
label: 'Christophe D’Enfert',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/denfert_0-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christophe-denfert/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2018734107,
size: 0.5,
source: 201873,
target: 4107 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2018734052,
size: 0.5,
source: 201873,
target: 4052 });
//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: 4180,
label: 'James Di Santo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_photojd-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/james-di-santo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2018734180,
size: 0.5,
source: 201873,
target: 4180 });
//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: 4597,
label: 'Michaela Muller-Trutwin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_michaela-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/michaela-muller-trutwin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2018734597,
size: 0.5,
source: 201873,
target: 4597 });
//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: 4600,
label: 'Asier Sáez-Cirión',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_dsc2316-e1441290951360-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/asier-saez-cirion/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2018734600,
size: 0.5,
source: 201873,
target: 4600 });
//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: 2018734821,
size: 0.5,
source: 201873,
target: 4821 });
// 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: 191032,
label: 'EVENT: “First live track detection of HIV DNA in Humanized model by single-cell imaging”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/first-live-track-detection-of-hiv-dna-in-humanized-model-by-single-cell-imaging/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052191032,
size: 0.5,
source: 4052,
target: 191032,
});
//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: 142283,
label: 'Jean-Sebastien Diana',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/jean-sebastien-diana/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 191032142283,
size: 0.5,
source: 191032,
target: 142283 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1910324052,
size: 0.5,
source: 191032,
target: 4052 });
// 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: 189985,
label: 'EVENT: Groupe de Reflexion SIDA (GRS) meeting: “Role of membraneless organelles in viral replication”',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/05/research_pasteur-grs-logo-3-square-150x150.png',
page_url: 'https://research.pasteur.fr/en/event/groupe-de-reflexion-sida-grs-meeting-role-of-membraneless-organelles-in-viral-replication/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052189985,
size: 0.5,
source: 4052,
target: 189985,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1899853931,
size: 0.5,
source: 189985,
target: 3931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1899854052,
size: 0.5,
source: 189985,
target: 4052 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4818) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1899854818,
size: 0.5,
source: 189985,
target: 4818 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4575) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1899854575,
size: 0.5,
source: 189985,
target: 4575 });
// 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: 183916,
label: 'EVENT: Groupe de Reflexion SIDA (GRS) seminar: “Functional and structural studies of the T cell response against two major human viruses: HIV-1 and SARS-CoV-2”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/groupe-de-reflexion-sida-grs-seminar-functional-and-structural-studies-of-the-t-cell-response-against-two-major-human-viruses-hiv-1-and-sars-cov-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052183916,
size: 0.5,
source: 4052,
target: 183916,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1839163931,
size: 0.5,
source: 183916,
target: 3931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4818) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1839164818,
size: 0.5,
source: 183916,
target: 4818 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4575) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1839164575,
size: 0.5,
source: 183916,
target: 4575 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1839164052,
size: 0.5,
source: 183916,
target: 4052 });
// 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: 175319,
label: 'PROJECT: Project 3: HIV-1 and nuclear membraneless organelles',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/project-3-hiv-1-and-nuclear-membraneless-organelles/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052175319,
size: 0.5,
source: 4052,
target: 175319,
});
//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: 120176,
label: 'Viviana Scoca',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=120176',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 175319120176,
size: 0.5,
source: 175319,
target: 120176 });
//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: 153472,
label: 'Selen Ay',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/01/research_pasteur-selen-ay-img-6895-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-selen-ay/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 175319153472,
size: 0.5,
source: 175319,
target: 153472 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 142283) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 175319142283,
size: 0.5,
source: 175319,
target: 142283 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1753194052,
size: 0.5,
source: 175319,
target: 4052 });
// 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: 175317,
label: 'PROJECT: Project 2: Deciphering the early steps of HIV-1 infection: discovery of a new early step mechanism.',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/project-2-deciphering-the-early-steps-of-hiv-1-infection-discovery-of-a-new-early-step-mechanism/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052175317,
size: 0.5,
source: 4052,
target: 175317,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 120176) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 175317120176,
size: 0.5,
source: 175317,
target: 120176 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1753174052,
size: 0.5,
source: 175317,
target: 4052 });
// 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: 175313,
label: 'PROJECT: Project 1: Ultrastructural conformation states of HIV-1 during the early steps of viral infection',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/project-1-ultrastructural-conformation-states-of-hiv-1-during-the-early-steps-of-viral-infection/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052175313,
size: 0.5,
source: 4052,
target: 175313,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1753134052,
size: 0.5,
source: 175313,
target: 4052 });
// 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: 168953,
label: 'EVENT: Groupe de Réflexion SIDA (GRS) meeting: “The cytoskeleton and viruses”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/groupe-de-reflexion-sida-grs-meeting-the-cytoskeleton-and-viruses/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052168953,
size: 0.5,
source: 4052,
target: 168953,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1689534052,
size: 0.5,
source: 168953,
target: 4052 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1689533931,
size: 0.5,
source: 168953,
target: 3931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4818) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1689534818,
size: 0.5,
source: 168953,
target: 4818 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4575) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1689534575,
size: 0.5,
source: 168953,
target: 4575 });
//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: 64278,
label: 'Livia Pedroza-Martins',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/epartner/livia-pedroza-martins/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 16895364278,
size: 0.5,
source: 168953,
target: 64278 });
// 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: 166394,
label: 'COURSE: MOOC Viruses and Human Cancers',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/09/research_pasteur-mooc-viruses-and-human-cancers-institutpasteur-34614-creditsodilecroissant-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/course/mooc-viruses-and-human-cancers/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052166394,
size: 0.5,
source: 4052,
target: 166394,
});
//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: 4962,
label: 'Jean-Pierre Vartanian',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/09/research_pasteur-jean-pierre-vartanian-photo-jpv--150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-pierre-vartanian/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663944962,
size: 0.5,
source: 166394,
target: 4962 });
//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: 7142,
label: 'Christian Bréchot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/0305_CB-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christian-brechot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663947142,
size: 0.5,
source: 166394,
target: 7142 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1663944052,
size: 0.5,
source: 166394,
target: 4052 });
//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: 8578,
label: 'Daniel Scott-Algara',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/12/research.pasteur.fr_dsc7039-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/daniel-scott-algara/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663948578,
size: 0.5,
source: 166394,
target: 8578 });
//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: 4328,
label: 'Antoine Gessain',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_a.g-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/antoine-gessain/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663944328,
size: 0.5,
source: 166394,
target: 4328 });
//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: 4324,
label: 'Pierre-Emmanuel Ceccaldi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_pephoto-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-emmanuel-ceccaldi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663944324,
size: 0.5,
source: 166394,
target: 4324 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8600,
label: 'Hélène Laude',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/10/research_pasteur-photo_helene_laude-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/helene-laude/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663948600,
size: 0.5,
source: 166394,
target: 8600 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4133,
label: 'Pascal Pineau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ef317547742df3f889_l_1e91c-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pascal-pineau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663944133,
size: 0.5,
source: 166394,
target: 4133 });
//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: 6391,
label: 'Marie-Louise Michel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_marie-louise-michel-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-louise-michel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663946391,
size: 0.5,
source: 166394,
target: 6391 });
//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: 4186,
label: 'Hélène Strick-Marchand',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_helena-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/helene-strick-marchand/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663944186,
size: 0.5,
source: 166394,
target: 4186 });
//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: 4881,
label: 'Frédéric Tangy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig11-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/frederic-tangy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663944881,
size: 0.5,
source: 166394,
target: 4881 });
//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/05/research_pasteur-clementine-schilte-photo-2022-scaled-e1692277761405-150x150.jpg',
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: 1663946816,
size: 0.5,
source: 166394,
target: 6816 });
//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: 917,
label: 'Odile Sismeiro',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/OdileSismeiro-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/odile-sismeiro/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 166394917,
size: 0.5,
source: 166394,
target: 917 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 7063,
label: 'Monica Sala',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-monica-sala-research-pasteur-monica-sala-monicaphoto2020-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/monica-sala/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1663947063,
size: 0.5,
source: 166394,
target: 7063 });
// 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: 119282,
label: 'TEAM: Advanced Molecular Virology',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/advanced-molecular-virology/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4052119282,
size: 0.5,
source: 4052,
target: 119282,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 153472) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 119282153472,
size: 0.5,
source: 119282,
target: 153472 });
//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: 8213,
label: 'Céline Cuche',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_celine-cuche-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/celine-cuche/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1192828213,
size: 0.5,
source: 119282,
target: 8213 });
//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: 198470,
label: 'Chiara Tomasini',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/03/research_pasteur-tomasini-chiara-photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/chiara-tomasini/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 119282198470,
size: 0.5,
source: 119282,
target: 198470 });
//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: 88943,
label: 'Florence Jeannot',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/florence-jeannot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 11928288943,
size: 0.5,
source: 119282,
target: 88943 });
//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: 133189,
label: 'Thierry Mourer',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/thierry-mourer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 119282133189,
size: 0.5,
source: 119282,
target: 133189 });
//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: 210741,
label: 'Bruno Tello Rubio',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/bruno-tello-rubio/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 119282210741,
size: 0.5,
source: 119282,
target: 210741 });
//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: 231646,
label: 'Antonio Marino Cerrato',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/antonio-marino-cerrato/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 119282231646,
size: 0.5,
source: 119282,
target: 231646 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1192824052,
size: 0.5,
source: 119282,
target: 4052 });
// 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: 64262,
label: 'PROJECT: Group for AIDS Research',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_grs-logo-3-square-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/groupe-reflexion-sida/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 405264262,
size: 0.5,
source: 4052,
target: 64262,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4818) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624818,
size: 0.5,
source: 64262,
target: 4818 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3931) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642623931,
size: 0.5,
source: 64262,
target: 3931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4575) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624575,
size: 0.5,
source: 64262,
target: 4575 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4600) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624600,
size: 0.5,
source: 64262,
target: 4600 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4597) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624597,
size: 0.5,
source: 64262,
target: 4597 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4821) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624821,
size: 0.5,
source: 64262,
target: 4821 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4881) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624881,
size: 0.5,
source: 64262,
target: 4881 });
//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: 4963,
label: 'Simon Wain-Hobson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig2-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/simon-wain-hobson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624963,
size: 0.5,
source: 64262,
target: 4963 });
//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: 4051,
label: 'Pierre Charneau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig10-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/pierre-charneau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624051,
size: 0.5,
source: 64262,
target: 4051 });
//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: 3928,
label: 'Fernando Arenzana-Seisdedos',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig60-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fernando-arenzana-seisdedos/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642623928,
size: 0.5,
source: 64262,
target: 3928 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4052) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624052,
size: 0.5,
source: 64262,
target: 4052 });
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) {
});