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: 1585,
label: 'Anne Danckaert',
type: 'image',
url: '',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=8
// 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: 205717,
label: 'EVENT: Inauguration new BSL2 imaging lab',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/inauguration-new-bsl2-imaging-lab/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 1585205717,
size: 0.5,
source: 1585,
target: 205717,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2057171585,
size: 0.5,
source: 205717,
target: 1585 });
//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: 106754,
label: 'Lesly Raulin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-sans-titre-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/lesly-raulin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 205717106754,
size: 0.5,
source: 205717,
target: 106754 });
//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: 112337,
label: 'Elric Esposito',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/08/research_pasteur-elric-esposito-eelarge-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/elric-esposito/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 205717112337,
size: 0.5,
source: 205717,
target: 112337 });
//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: 3952,
label: 'Christelle Travaillé',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-christelle-travaille-20240607-145817-e1717766347618-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christelle-travaille/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2057173952,
size: 0.5,
source: 205717,
target: 3952 });
//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: 165850,
label: 'Nassim Mahtal',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/nassim-mahtal/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 205717165850,
size: 0.5,
source: 205717,
target: 165850 });
//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: 193310,
label: 'Yumi Gosselin',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/yumi-gosselin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 205717193310,
size: 0.5,
source: 205717,
target: 193310 });
//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: 2226,
label: 'Audrey Salles',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/03/research_pasteur-audrey-salles-audrey-202-crop-300-v5-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/audrey-salles/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2057172226,
size: 0.5,
source: 205717,
target: 2226 });
//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: 75430,
label: 'Julien Fernandes',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/10/research_pasteur-photo_jf-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/julien-fernandes/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 20571775430,
size: 0.5,
source: 205717,
target: 75430 });
//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: 2232,
label: 'Nathalie Aulner',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_dsc03316-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/nathalie-aulner/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2057172232,
size: 0.5,
source: 205717,
target: 2232 });
//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: 36272,
label: 'Cidalia Da Agra',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photocidalia-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/cidalia-da-agra/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 20571736272,
size: 0.5,
source: 205717,
target: 36272 });
//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: 1589,
label: 'Spencer Shorte',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/spencer-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/spencer-shorte/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2057171589,
size: 0.5,
source: 205717,
target: 1589 });
// 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: 131478,
label: 'NEWS: Pascal',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/pascal/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 1585131478,
size: 0.5,
source: 1585,
target: 131478,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2232) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1314782232,
size: 0.5,
source: 131478,
target: 2232 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1314781585,
size: 0.5,
source: 131478,
target: 1585 });
// 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: 94012,
label: 'TEAM: Photonic BioImaging (UTechS PBI)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2014/09/Neuron-spark-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/photonic-bioimaging-utechs-pbi/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 158594012,
size: 0.5,
source: 1585,
target: 94012,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 940121585,
size: 0.5,
source: 94012,
target: 1585 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2226) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 940122226,
size: 0.5,
source: 94012,
target: 2226 });
//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: 4783,
label: 'Régis Tournebize',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dsc02236_rt2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/regis-tournebize/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 940124783,
size: 0.5,
source: 94012,
target: 4783 });
//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: 2255,
label: 'Brigitte David-Watine',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/brigitte-david-watine/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 940122255,
size: 0.5,
source: 94012,
target: 2255 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 36272) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 9401236272,
size: 0.5,
source: 94012,
target: 36272 });
//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: 4199,
label: 'Florian Ruckerl',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/08/research.pasteur.fr_florianr-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/florian-ruckerl/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 940124199,
size: 0.5,
source: 94012,
target: 4199 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 75430) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 9401275430,
size: 0.5,
source: 94012,
target: 75430 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 112337) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 94012112337,
size: 0.5,
source: 94012,
target: 112337 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 106754) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 94012106754,
size: 0.5,
source: 94012,
target: 106754 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 3952) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 940123952,
size: 0.5,
source: 94012,
target: 3952 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 165850) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 94012165850,
size: 0.5,
source: 94012,
target: 165850 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 193310) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 94012193310,
size: 0.5,
source: 94012,
target: 193310 });
//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: 4976,
label: 'Florian Muller',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-florian-muller-mueller-florian-picture-2023-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/florian-muller/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 940124976,
size: 0.5,
source: 94012,
target: 4976 });
//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: 179429,
label: 'Maria Isabella Gariboldi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/04/research_pasteur-maria-isabella-gariboldi-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/maria-isabella-gariboldi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 94012179429,
size: 0.5,
source: 94012,
target: 179429 });
//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: 189004,
label: 'Thomas Defard',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/10/research_pasteur-photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thomas-defard/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 94012189004,
size: 0.5,
source: 94012,
target: 189004 });
//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: 4982,
label: 'Christian Weber',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_christianweber-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christian-weber/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 940124982,
size: 0.5,
source: 94012,
target: 4982 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1589) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 940121589,
size: 0.5,
source: 94012,
target: 1589 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2232) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 940122232,
size: 0.5,
source: 94012,
target: 2232 });
// 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: 67742,
label: 'TOOL: Dual microscopy assay to discriminate Listeria cellular entry & vacuolar escape',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/04/research.pasteur.fr_150716-4colors-b2-3colors-150x150.png',
page_url: 'https://research.pasteur.fr/en/tool/dual-microscopy-assay-to-discriminate-listeria-cellular-entry-vacuolar-escape/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 158567742,
size: 0.5,
source: 1585,
target: 67742,
});
//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: 3783,
label: 'Pascale Cossart',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research.pasteur.fr_pascale-cossart-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pascale-cossart/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 677423783,
size: 0.5,
source: 67742,
target: 3783 });
//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: 4095,
label: 'Juan Jose Quereda Torres',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_juan-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/juan-jose-quereda-torres/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 677424095,
size: 0.5,
source: 67742,
target: 4095 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4237,
label: 'Jost Enninga',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/06/research.pasteur.fr_jost2015-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jost-enninga/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 677424237,
size: 0.5,
source: 67742,
target: 4237 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2232) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 677422232,
size: 0.5,
source: 67742,
target: 2232 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 677421585,
size: 0.5,
source: 67742,
target: 1585 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1589) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 677421589,
size: 0.5,
source: 67742,
target: 1589 });
//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: 4094,
label: 'Javier Pizarro-Cerda',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-javier-pizarro-cerda-javier-pizarro-1300-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/javier-pizarro-cerda/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 677424094,
size: 0.5,
source: 67742,
target: 4094 });
// 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: 59339,
label: 'PROJECT: Pharmacological prevention and treatment of long-term cognitive and behavioral effects of neuroinflammation',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_coupe-epaisse-40x-modified-1-glissees1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/pharmacological-prevention-and-treatment-of-long-term-cognitive-and-behavioral-effects-of-neuroinflammation/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 158559339,
size: 0.5,
source: 1585,
target: 59339,
});
//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: 8667,
label: 'Patricia Flamant',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=8667',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 593398667,
size: 0.5,
source: 59339,
target: 8667 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 593391585,
size: 0.5,
source: 59339,
target: 1585 });
//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: 114976,
label: 'Gabriela Ferreira de Medeiros',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/10/research_pasteur-gabi-pic-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gabriela-ferreira-de-medeiros/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 59339114976,
size: 0.5,
source: 59339,
target: 114976 });
//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: 4073,
label: 'Franck Verdonk',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_uge3dfb5-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/franck-verdonk/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 593394073,
size: 0.5,
source: 59339,
target: 4073 });
//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: 4064,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 593394064,
size: 0.5,
source: 59339,
target: 4064 });
//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: 6382,
label: 'Fabrice Chretien',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_sans-titre1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabrice-chretien/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 593396382,
size: 0.5,
source: 59339,
target: 6382 });
// 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: 53706,
label: 'PROJECT: Brain & Sepsis',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_sans-titre2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/brain-sepsis/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 158553706,
size: 0.5,
source: 1585,
target: 53706,
});
//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: 4070,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 537064070,
size: 0.5,
source: 53706,
target: 4070 });
//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: 4032,
label: 'Jean-Marc Cavaillon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_cavaillon-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-marc-cavaillon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 537064032,
size: 0.5,
source: 53706,
target: 4032 });
//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: 8676,
label: 'Tarek Sharshar',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_img_20151120_154248-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/tarek-sharshar/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 537068676,
size: 0.5,
source: 53706,
target: 8676 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 537061585,
size: 0.5,
source: 53706,
target: 1585 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4073) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 537064073,
size: 0.5,
source: 53706,
target: 4073 });
//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: 4067,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 537064067,
size: 0.5,
source: 53706,
target: 4067 });
//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: 4069,
label: 'Aurélien Mazeraud',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4069',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 537064069,
size: 0.5,
source: 53706,
target: 4069 });
//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: 53396,
label: 'Cedric Thepenier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=53396',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 5370653396,
size: 0.5,
source: 53706,
target: 53396 });
//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: 52804,
label: 'Daniel Fiole',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/daniel-fiole/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 5370652804,
size: 0.5,
source: 53706,
target: 52804 });
// 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: 36847,
label: 'PROJECT: FP7 Targeting the Leishmania kinome for the development of novel anti-parasitic strategies (LeishDrug)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_featured-fp7-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/project/fp7-leishdrug-targeting-the-leishmania-kinome-for-the-development-of-novel-anti-parasitic-strategies/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 158536847,
size: 0.5,
source: 1585,
target: 36847,
});
//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: 8437,
label: 'Olivier Leclercq',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/02/research_pasteur-olivier2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivier-leclercq/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368478437,
size: 0.5,
source: 36847,
target: 8437 });
//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: 4850,
label: 'Najma Rachidi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_najma-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/najma-rachidi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368474850,
size: 0.5,
source: 36847,
target: 4850 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 2232) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 368472232,
size: 0.5,
source: 36847,
target: 2232 });
//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: 4847,
label: 'Eric Prina',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_eric-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/eric-prina/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368474847,
size: 0.5,
source: 36847,
target: 4847 });
//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: 7854,
label: 'Pierre-Henri Commere',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/pierre-henri-commere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368477854,
size: 0.5,
source: 36847,
target: 7854 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 368471585,
size: 0.5,
source: 36847,
target: 1585 });
//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: 7144,
label: 'Nadia Khelef',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha53-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nadia-khelef/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368477144,
size: 0.5,
source: 36847,
target: 7144 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4571,
label: 'Thierry Lang',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_thierry-new-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/thierry-lang/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368474571,
size: 0.5,
source: 36847,
target: 4571 });
//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: 7033,
label: 'Hervé Lecoeur',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-herve-lecoeur-herve-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/herve-lecoeur/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368477033,
size: 0.5,
source: 36847,
target: 7033 });
//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: 6955,
label: 'Geneviève Milon',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/genevieve-milon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368476955,
size: 0.5,
source: 36847,
target: 6955 });
//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: 4693,
label: 'Hélène Munier-Lehmann',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo-hml-recadre-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/helene-munier-lehmann/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368474693,
size: 0.5,
source: 36847,
target: 4693 });
//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: 4694,
label: 'Sylvie Pochet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_sans-titre2-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/sylvie-pochet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368474694,
size: 0.5,
source: 36847,
target: 4694 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1589) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 368471589,
size: 0.5,
source: 36847,
target: 1589 });
//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: 4848,
label: 'Gérald Spaeth',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-gerald-spaeth-portrait-gfs-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gerald-spaeth/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 368474848,
size: 0.5,
source: 36847,
target: 4848 });
// 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: 1580,
label: 'PROJECT: Development and Application of new Molecular Probes',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/development-and-application-of-new-molecular-probes/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 15851580,
size: 0.5,
source: 1585,
target: 1580,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1589) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 15801589,
size: 0.5,
source: 1580,
target: 1589 });
//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: 1581,
label: 'Jean-Yves Tinevez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/JYT-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jean-yves-tinevez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 15801581,
size: 0.5,
source: 1580,
target: 1581 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 1585) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 15801585,
size: 0.5,
source: 1580,
target: 1585 });
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) {
});