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: 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',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=10
// 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: 216604,
label: 'EVENT: Club viro: SARS-CoV2 RBD-Specific Antibodies /// APOBEC3F & Monkeypox virus',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/club-viro-sars-cov2-rbd-specific-antibodies-apobec3f-monkeypox-virus/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962216604,
size: 0.5,
source: 4962,
target: 216604,
});
//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: 69277,
label: 'Maël Bessaud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research_pasteur-mael-bessaud-bessaud-mael--150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/mael-bessaud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21660469277,
size: 0.5,
source: 216604,
target: 69277 });
//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: 4880,
label: 'Nolwenn Jouvenet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_nolwenn-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/nolwenn-jouvenet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2166044880,
size: 0.5,
source: 216604,
target: 4880 });
//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: 4163,
label: 'Bruno Blondel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_p1000035rec-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/bruno-blondel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2166044163,
size: 0.5,
source: 216604,
target: 4163 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2166044962,
size: 0.5,
source: 216604,
target: 4962 });
// 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: 216141,
label: 'COURSE: Viral Outbreaks and Pandemics, A One Health Approach MOOC',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/12/research_pasteur-shutterstock-1769187632-ld-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/course/viral-outbreaks-and-pandemics-a-one-health-approach/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962216141,
size: 0.5,
source: 4962,
target: 216141,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 2624,
label: 'Arnaud Fontanet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_arnaud-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/arnaud-fontanet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2161412624,
size: 0.5,
source: 216141,
target: 2624 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 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: 2161414324,
size: 0.5,
source: 216141,
target: 4324 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2161414962,
size: 0.5,
source: 216141,
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: 23965,
label: 'Stephan Zientara',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig103-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/epartner/stephan-zientara/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 21614123965,
size: 0.5,
source: 216141,
target: 23965 });
//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: 145046,
label: 'Laurie Pinaud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/11/research_pasteur-1398451-10151989867577520-1823773709-o-e1604852006341-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laurie-pinaud-2/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 216141145046,
size: 0.5,
source: 216141,
target: 145046 });
//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: 2161416816,
size: 0.5,
source: 216141,
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: 216141917,
size: 0.5,
source: 216141,
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: 165941,
label: 'Emerson Leonardo Alvarez Quinche',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/emerson-leonardo-alvarez-quinche/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 216141165941,
size: 0.5,
source: 216141,
target: 165941 });
// 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: 208517,
label: 'EVENT: Club viro: Influenza A virus & TDP-43 /// SARS-CoV-2-mediated cell hijacking',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/club-viro-influenza-a-virus-tdp-43-sars-cov-2-mediated-cell-hijacking/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962208517,
size: 0.5,
source: 4962,
target: 208517,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4880) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2085174880,
size: 0.5,
source: 208517,
target: 4880 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 69277) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 20851769277,
size: 0.5,
source: 208517,
target: 69277 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2085174962,
size: 0.5,
source: 208517,
target: 4962 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4163) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2085174163,
size: 0.5,
source: 208517,
target: 4163 });
// 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: 193580,
label: 'TEAM: Virus and cellular stress',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/virus-and-cellular-stress/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962193580,
size: 0.5,
source: 4962,
target: 193580,
});
//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: 4961,
label: 'Rodolphe Suspene',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/rodolphe-suspene/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1935804961,
size: 0.5,
source: 193580,
target: 4961 });
//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: 8328,
label: 'Lydie Couturier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_lydie-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/lydie-couturier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1935808328,
size: 0.5,
source: 193580,
target: 8328 });
//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: 212495,
label: 'Kyle Raymond',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/11/research_pasteur-enkyle-raymondfrkyle-raymond-27789-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/kyle-raymond/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 193580212495,
size: 0.5,
source: 193580,
target: 212495 });
//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: 212504,
label: 'Théo Defresne',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/11/research_pasteur-entheo-defresnefrtheo-defresne-photo-identite-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/theo-defresne/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 193580212504,
size: 0.5,
source: 193580,
target: 212504 });
//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: 231909,
label: 'Béibhinn O’HORA',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/beibhinn-ohora/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 193580231909,
size: 0.5,
source: 193580,
target: 231909 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1935804962,
size: 0.5,
source: 193580,
target: 4962 });
// 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: 190414,
label: 'EVENT: « Population dynamics of RNA arthropod-borne viruses in experimental evolution »',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/population-dynamics-of-rna-arthropod-borne-viruses-in-experimental-evolution/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962190414,
size: 0.5,
source: 4962,
target: 190414,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1904144962,
size: 0.5,
source: 190414,
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: 4955,
label: 'Marco Vignuzzi',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4955',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1904144955,
size: 0.5,
source: 190414,
target: 4955 });
// 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: 186865,
label: 'EVENT: “Structural biology of beneficial viruses: the anatomy of a flagellotropic bacteriophage and surprises in the architecture of flaviviruses.”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/structural-biology-of-beneficial-viruses-the-anatomy-of-a-flagellotropic-bacteriophage-and-surprises-in-the-architecture-of-flaviviruses/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962186865,
size: 0.5,
source: 4962,
target: 186865,
});
//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: 4732,
label: 'Marie Flamand',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_marie_flamand-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-flamand/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1868654732,
size: 0.5,
source: 186865,
target: 4732 });
//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: 4724,
label: 'Félix A. Rey',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-enfelix-a-reyfrfelix-rey-portrait-felixrey-1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/felix-rey/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1868654724,
size: 0.5,
source: 186865,
target: 4724 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1868654962,
size: 0.5,
source: 186865,
target: 4962 });
// 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: 172575,
label: 'COURSE: Emerging and re-emerging viruses MOOC',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/12/research_pasteur-emerging-and-re-emerging-viruses-mooc-institutpasteur-28412-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/course/emerging-and-re-emerging-viruses-mooc/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962172575,
size: 0.5,
source: 4962,
target: 172575,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1725754962,
size: 0.5,
source: 172575,
target: 4962 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4324) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1725754324,
size: 0.5,
source: 172575,
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: 4894,
label: 'Maxime Chazal',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_photo-pasteur-website-3-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/maxime-chazal/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1725754894,
size: 0.5,
source: 172575,
target: 4894 });
// 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: 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: 4962166394,
size: 0.5,
source: 4962,
target: 166394,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//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
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: 4052,
label: 'Francesca Di Nunzio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/01/research_pasteur-dscf1697-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francesca-di-nunzio/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//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
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4324) {
n.size = n.size + 8;
}
});
//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
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 6816) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1663946816,
size: 0.5,
source: 166394,
target: 6816 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 917) {
n.size = n.size + 8;
}
});
//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 * 8 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 8 * Math.PI / N) * 10;
g.nodes.push({
id: 158464,
label: 'PROGRAM_PROJECT: Cancer Initiative',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/05/research_pasteur-encancer-initiativefrinitiative-cancer-institutpasteur-i05997-axe-cancer-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/program_project/cancer-initiative/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4962158464,
size: 0.5,
source: 4962,
target: 158464,
});
//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: 4176,
label: 'Ludovic Deriano',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/07/research.pasteur.fr_sans-titre-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ludovic-deriano/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1584644176,
size: 0.5,
source: 158464,
target: 4176 });
//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: 4246,
label: 'Sandrine Etienne-Manneville',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_sandrine_etienne-manneville-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sandrine-etienne-manneville/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1584644246,
size: 0.5,
source: 158464,
target: 4246 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1584644962,
size: 0.5,
source: 158464,
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: 4483,
label: 'Han Li',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_han_li_small-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/han-li/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1584644483,
size: 0.5,
source: 158464,
target: 4483 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4138,
label: 'Marc Delarue',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_marc2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marc-delarue/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1584644138,
size: 0.5,
source: 158464,
target: 4138 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4355,
label: 'Ivo Gomperts Boneca',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-ivo-gomperts-boneca-p9090188-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/ivo-gomperts-boneca/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1584644355,
size: 0.5,
source: 158464,
target: 4355 });
// 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: 34,
label: 'DEPARTMENT: Virology',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/HIV1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/department/virology/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 496234,
size: 0.5,
source: 4962,
target: 34,
});
//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: 174732,
label: 'Bérangère Virlon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/01/research_pasteur-berangere-virlon-virlon-berengere-2314-bv-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/berangere-virlon/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 34174732,
size: 0.5,
source: 34,
target: 174732 });
//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: 184781,
label: 'Christine Letellier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/01/research_pasteur-christine-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christine-letellier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 34184781,
size: 0.5,
source: 34,
target: 184781 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4962) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 344962,
size: 0.5,
source: 34,
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: 62643,
label: 'Sarah Merkling',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_img_1465-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/sarah-merkling/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 3462643,
size: 0.5,
source: 34,
target: 62643 });
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) {
});