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: 4611,
label: 'Benjamin Bardiaux',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_bardiaux-150x150.jpg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=18
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 230328,
label: 'EVENT: Half-day “AI in structural biology: What’s next”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/half-day-ai-in-structural-biology-whats-next/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611230328,
size: 0.5,
source: 4611,
target: 230328,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 2303284611,
size: 0.5,
source: 230328,
target: 4611 });
//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: 117326,
label: 'Max Bonomi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/03/research_pasteur-njkzmdmz-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/massimiliano-bonomi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 230328117326,
size: 0.5,
source: 230328,
target: 117326 });
//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: 7039,
label: 'Marie-Laure Goupil',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo-marie-laure-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/marie-laure-goupil/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 2303287039,
size: 0.5,
source: 230328,
target: 7039 });
//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: 144602,
label: 'Céline Dormoy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/07/research_pasteur-enceline-dormoyfrceline-dormoy-img-20210727-110618-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/fr-celine-dormoy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 230328144602,
size: 0.5,
source: 230328,
target: 144602 });
// 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: 195937,
label: 'NEWS: Bacterial pathogenicity: improving understanding of an essential process – molecule secretion',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/news/bacterial-pathogenicity-improving-understanding-of-an-essential-process-molecule-secretion/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611195937,
size: 0.5,
source: 4611,
target: 195937,
});
//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: 4148,
label: 'Nadia Izadi-Pruneyre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_photo_site-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/nadia-izadi-pruneyre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1959374148,
size: 0.5,
source: 195937,
target: 4148 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1959374611,
size: 0.5,
source: 195937,
target: 4611 });
//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: 4297,
label: 'Olivera Francetic',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_o-francetic-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/olivera-francetic/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1959374297,
size: 0.5,
source: 195937,
target: 4297 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4623,
label: 'Michael Nilges',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/02/research.pasteur.fr_dsc3513-copy-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/michael-nilges/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1959374623,
size: 0.5,
source: 195937,
target: 4623 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 796,
label: 'Ahmed Haouz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/04/ahmed-haouz-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/ahmed-haouz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 195937796,
size: 0.5,
source: 195937,
target: 796 });
//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: 4147,
label: 'Florence Cordier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/08/research_pasteur-photo_flo_2019.06.25a_crop-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/florence-cordier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1959374147,
size: 0.5,
source: 195937,
target: 4147 });
//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: 98461,
label: 'Ariel Mechaly',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-njg1njqx-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/fr-ariel-mechaly/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 19593798461,
size: 0.5,
source: 195937,
target: 98461 });
//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: 4046,
label: 'Sébastien Brier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/11/research_pasteur-dsc_1803_hd.jpg-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/sebastien-brier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1959374046,
size: 0.5,
source: 195937,
target: 4046 });
//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: 117593,
label: 'Yuanyuan Li',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/07/research_pasteur-2-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/fr-yuanyuan-li/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 195937117593,
size: 0.5,
source: 195937,
target: 117593 });
//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: 140402,
label: 'Régine Dazzoni',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/03/research_pasteur-enregine-dazzonifrregine-dazzoni-fotbb28-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/regine-dazzoni-2/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 195937140402,
size: 0.5,
source: 195937,
target: 140402 });
// 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: 186667,
label: 'PROJECT: Energir: Comprendre les mécanismes moléculaires d’acquisition du fer chez les bactéries à Gram-négatif, par une approche intégrative',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/project/fr-energir-energy-dependent-iron-import-by-gram-negative-bacteria/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611186667,
size: 0.5,
source: 4611,
target: 186667,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1866674623,
size: 0.5,
source: 186667,
target: 4623 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4046) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1866674046,
size: 0.5,
source: 186667,
target: 4046 });
//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: 62876,
label: 'Marcel Hollenstein',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_thrashmanlessthrash-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/marcel-hollenstein/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18666762876,
size: 0.5,
source: 186667,
target: 62876 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1866674611,
size: 0.5,
source: 186667,
target: 4611 });
//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: 117296,
label: 'Maylis Lejeune',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/11/research_pasteur-maylis_2017-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/maylis-lejeune/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 186667117296,
size: 0.5,
source: 186667,
target: 117296 });
//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: 70499,
label: 'Olivier Sperandio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/05/research.pasteur.fr_sperandio-id-photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/olivier-sperandio/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18666770499,
size: 0.5,
source: 186667,
target: 70499 });
//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: 4616,
label: 'Guillaume Bouvier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/03/research.pasteur.fr_profile_1-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/guillaume-bouvier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1866674616,
size: 0.5,
source: 186667,
target: 4616 });
//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: 75573,
label: 'Fabienne Levi-Acobas',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/fabienne-levi-acobas/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18666775573,
size: 0.5,
source: 186667,
target: 75573 });
//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: 4624,
label: 'Riccardo Pellarin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_myself1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/riccardo-pellarin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1866674624,
size: 0.5,
source: 186667,
target: 4624 });
//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: 157457,
label: 'Maximilian Zinke',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/maximilian-zinke/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 186667157457,
size: 0.5,
source: 186667,
target: 157457 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4148) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1866674148,
size: 0.5,
source: 186667,
target: 4148 });
// 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: 168008,
label: 'PROJECT: ANR OM-LipAsy: Outer membrane lipid asymmetry in Veillonella parvula, an atypical diderm Firmicute',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/09/research_pasteur-enom-lipasy-capture-decran-2021-09-28-a-18.08.11-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/om-lipasy/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611168008,
size: 0.5,
source: 4611,
target: 168008,
});
//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: 4286,
label: 'Simonetta Gribaldo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/10/research_pasteur-photo-simo2-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/simonetta-gribaldo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1680084286,
size: 0.5,
source: 168008,
target: 4286 });
//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: 90107,
label: 'Najwa Taib',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/05/research_pasteur-photo_ntaib-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/najwa-taib/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 16800890107,
size: 0.5,
source: 168008,
target: 90107 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4148) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1680084148,
size: 0.5,
source: 168008,
target: 4148 });
//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: 4345,
label: 'Sylvie Létoffé',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_sylvie2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/sylvie-letoffe/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1680084345,
size: 0.5,
source: 168008,
target: 4345 });
//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: 4344,
label: 'Bianca Audrain',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_bianca2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/bianca-audrain/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1680084344,
size: 0.5,
source: 168008,
target: 4344 });
//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: 148650,
label: 'Basile Beaud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/10/research_pasteur-8a951152-5fa0-4920-99f6-30c8a2ec3081-150x150.jpeg',
page_url: 'https://research.pasteur.fr/fr/member/fr-basile-beaud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 168008148650,
size: 0.5,
source: 168008,
target: 148650 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1680084611,
size: 0.5,
source: 168008,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 117296) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 168008117296,
size: 0.5,
source: 168008,
target: 117296 });
//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: 188060,
label: 'Anna Kurowska',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/10/research_pasteur-anna-kurowska-img-0644-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/anna-kurowska/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 168008188060,
size: 0.5,
source: 168008,
target: 188060 });
//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: 4335,
label: 'Christophe Beloin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_christophe2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/christophe-beloin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1680084335,
size: 0.5,
source: 168008,
target: 4335 });
// 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: 160215,
label: 'EVENT: JOBIM Mini-symposium “Integrative structural modeling in the era of big data and artificial intelligence”',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/06/research_pasteur-jobim-mini-symposium-integrative-structural-modeling-in-the-era-of-big-data-and-artificial-intelligence-jobim-3d2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/event/jobim-mini-symposium-integrative-structural-modeling-in-the-era-of-big-data-and-artificial-intelligence/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611160215,
size: 0.5,
source: 4611,
target: 160215,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1602154611,
size: 0.5,
source: 160215,
target: 4611 });
// 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: 142129,
label: 'TOOL: ARIAweb: a server for automated NMR structure calculation',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_test-150x150.png',
page_url: 'https://research.pasteur.fr/fr/tool/ariaweb-a-server-for-automated-nmr-structure-calculation/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611142129,
size: 0.5,
source: 4611,
target: 142129,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1421294623,
size: 0.5,
source: 142129,
target: 4623 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 6830,
label: 'Fabien Mareuil',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_imag0560_1_2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/fabien-mareuil/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1421296830,
size: 0.5,
source: 142129,
target: 6830 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1421294611,
size: 0.5,
source: 142129,
target: 4611 });
// 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: 130091,
label: 'PROJECT: Synergy_T2SS',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/project/synergy_t2ss/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611130091,
size: 0.5,
source: 4611,
target: 130091,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 117593) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 130091117593,
size: 0.5,
source: 130091,
target: 117593 });
//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: 4301,
label: 'Ingrid Guilvout',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_ingrid-guilvout-new-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/ingrid-guilvout/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1300914301,
size: 0.5,
source: 130091,
target: 4301 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1300914611,
size: 0.5,
source: 130091,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4297) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1300914297,
size: 0.5,
source: 130091,
target: 4297 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4148) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1300914148,
size: 0.5,
source: 130091,
target: 4148 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1300914623,
size: 0.5,
source: 130091,
target: 4623 });
// 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: 128926,
label: 'EVENT: Department of Structural Biology and Chemistry seminar: Dr. Pablo Chacon, Fitting tools for integrative structural biology',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/department-of-structural-biology-and-chemistry-seminar-dr-pablo-chacon-fitting-tools-for-integrative-structural-biology/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4611128926,
size: 0.5,
source: 4611,
target: 128926,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1289264611,
size: 0.5,
source: 128926,
target: 4611 });
// 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: 99442,
label: 'PROJECT: ViBrANT (Viral and Bacterial Adhesin Network Training)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/11/research_pasteur-screen-shot-2017-11-28-at-15.12.54-150x150.png',
page_url: 'https://research.pasteur.fr/fr/project/vibrant-viral-bacterial-adhesin-network-training/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461199442,
size: 0.5,
source: 4611,
target: 99442,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 994424611,
size: 0.5,
source: 99442,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4148) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 994424148,
size: 0.5,
source: 99442,
target: 4148 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 994424623,
size: 0.5,
source: 99442,
target: 4623 });
// 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: 89266,
label: 'EVENT: Computational geometry for the determination of biomolecular structures',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/computational-geometry-for-the-determination-of-biomolecular-structures/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461189266,
size: 0.5,
source: 4611,
target: 89266,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 892664611,
size: 0.5,
source: 89266,
target: 4611 });
//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: 4612,
label: 'Thérèse Malliavin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_3ccf6f5-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/therese-malliavin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 892664612,
size: 0.5,
source: 89266,
target: 4612 });
//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: 4622,
label: 'Mohamed Machat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4622',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 892664622,
size: 0.5,
source: 89266,
target: 4622 });
// 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: 85730,
label: 'EVENT: Dirk Linke seminar',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/dirk-linke-seminar/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461185730,
size: 0.5,
source: 4611,
target: 85730,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 857304611,
size: 0.5,
source: 85730,
target: 4611 });
// 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: 79460,
label: 'EVENT: Ecole thématique – Bioinformatics of protein-protein interactions for wet lab scientists',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/event/__trashed/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461179460,
size: 0.5,
source: 4611,
target: 79460,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 794604611,
size: 0.5,
source: 79460,
target: 4611 });
//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: 57919,
label: 'Claudia Chica',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/09/research_pasteur-img_1035-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/claudia-chica/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 7946057919,
size: 0.5,
source: 79460,
target: 57919 });
//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: 63334,
label: 'Natalia Pietrosemoli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_natphoto-1-150x150.png',
page_url: 'https://research.pasteur.fr/fr/member/natalia-pietrosemoli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 7946063334,
size: 0.5,
source: 79460,
target: 63334 });
//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: 3967,
label: 'Thomas Rolland',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-photo_tr_small2-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/thomas-rolland/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 794603967,
size: 0.5,
source: 79460,
target: 3967 });
// 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: 66080,
label: 'PROJECT: ARIA for hybrid structure determination on the cloud',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/03/research.pasteur.fr_test-150x150.png',
page_url: 'https://research.pasteur.fr/fr/project/aria-for-hybrid-structure-determination-on-the-cloud/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461166080,
size: 0.5,
source: 4611,
target: 66080,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 660804623,
size: 0.5,
source: 66080,
target: 4623 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 6830) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 660806830,
size: 0.5,
source: 66080,
target: 6830 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 660804611,
size: 0.5,
source: 66080,
target: 4611 });
// 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: 24279,
label: 'TEAM: Systèmes transmembranaires bactériens',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_i05280-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/team/bacterial-transmembrane-systems/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461124279,
size: 0.5,
source: 4611,
target: 24279,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 117296) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24279117296,
size: 0.5,
source: 24279,
target: 117296 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 157457) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 24279157457,
size: 0.5,
source: 24279,
target: 157457 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 242794611,
size: 0.5,
source: 24279,
target: 4611 });
//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: 8302,
label: 'Marie-Ange Garnier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_img_47534-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/marie-ange-garnier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 242798302,
size: 0.5,
source: 24279,
target: 8302 });
//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: 211765,
label: 'Abel TEULÉ',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/abel-teule/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24279211765,
size: 0.5,
source: 24279,
target: 211765 });
//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: 219333,
label: 'Ons Dakhlaoui',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/ons-dakhlaoui/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 24279219333,
size: 0.5,
source: 24279,
target: 219333 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4148) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 242794148,
size: 0.5,
source: 24279,
target: 4148 });
// adding node
var x_node = Math.cos(2 * 14 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 14 * Math.PI / N) * 10;
g.nodes.push({
id: 19832,
label: 'SOFTWARE: ARIA (Ambiguous Restraints for Iterative Assignment)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_logo_aria1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/software/aria-ambiguous-restraints-iterative-assignment/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461119832,
size: 0.5,
source: 4611,
target: 19832,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 198324611,
size: 0.5,
source: 19832,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 198324612,
size: 0.5,
source: 19832,
target: 4612 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 198324623,
size: 0.5,
source: 19832,
target: 4623 });
// adding node
var x_node = Math.cos(2 * 15 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 15 * Math.PI / N) * 10;
g.nodes.push({
id: 20689,
label: 'PROJECT: ERC-2011-AdG BAYCELLS',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_erc-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/erc-baycells/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461120689,
size: 0.5,
source: 4611,
target: 20689,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206894611,
size: 0.5,
source: 20689,
target: 4611 });
//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: 4610,
label: 'Quang Tru Huynh',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/quang-tru-huynh/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206894610,
size: 0.5,
source: 20689,
target: 4610 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4624) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206894624,
size: 0.5,
source: 20689,
target: 4624 });
//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: 4625,
label: 'Silke Wieninger',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4625',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206894625,
size: 0.5,
source: 20689,
target: 4625 });
//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: 4621,
label: 'Mathias Ferber',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4621',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206894621,
size: 0.5,
source: 20689,
target: 4621 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4616) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206894616,
size: 0.5,
source: 20689,
target: 4616 });
//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: 4617,
label: 'Simeon Carstens',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4617',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206894617,
size: 0.5,
source: 20689,
target: 4617 });
//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: 4614,
label: '',
type: 'image',
url: '',
page_url: '',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206894614,
size: 0.5,
source: 20689,
target: 4614 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206894623,
size: 0.5,
source: 20689,
target: 4623 });
// adding node
var x_node = Math.cos(2 * 16 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 16 * Math.PI / N) * 10;
g.nodes.push({
id: 20687,
label: 'PROJECT: Bip:Bip',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_bipbiplogo2-150x150.png',
page_url: 'https://research.pasteur.fr/fr/project/bipbip/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461120687,
size: 0.5,
source: 4611,
target: 20687,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4623) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874623,
size: 0.5,
source: 20687,
target: 4623 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4615,
label: 'Arnaud Blondel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-id-a_blondel-c-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/arnaud-blondel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874615,
size: 0.5,
source: 20687,
target: 4615 });
//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: 4618,
label: 'Pak-Lee Chau',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/pak-lee-chau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874618,
size: 0.5,
source: 20687,
target: 4618 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4612) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874612,
size: 0.5,
source: 20687,
target: 4612 });
//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: 4613,
label: 'Edouard Yeramian',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/02/research_pasteur-edouard-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/edouard-yeramian/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874613,
size: 0.5,
source: 20687,
target: 4613 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874611,
size: 0.5,
source: 20687,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4610) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874610,
size: 0.5,
source: 20687,
target: 4610 });
//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: 4627,
label: 'Nathalie Duclert-Savatier',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/nathalie-duclert-savatier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874627,
size: 0.5,
source: 20687,
target: 4627 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4624) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874624,
size: 0.5,
source: 20687,
target: 4624 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4625) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874625,
size: 0.5,
source: 20687,
target: 4625 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4621) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874621,
size: 0.5,
source: 20687,
target: 4621 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4616) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874616,
size: 0.5,
source: 20687,
target: 4616 });
//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: 4620,
label: 'Nathan Desdouits',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4620',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874620,
size: 0.5,
source: 20687,
target: 4620 });
//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: 4619,
label: 'Isidro Cortes Ciriano',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4619',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874619,
size: 0.5,
source: 20687,
target: 4619 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4617) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874617,
size: 0.5,
source: 20687,
target: 4617 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4622) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874622,
size: 0.5,
source: 20687,
target: 4622 });
//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: 4626,
label: 'Damien Monet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/?post_type=member&p=4626',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206874626,
size: 0.5,
source: 20687,
target: 4626 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4614) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206874614,
size: 0.5,
source: 20687,
target: 4614 });
//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: 8205,
label: 'Audrey Legendre',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/fr/member/audrey-legendre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 206878205,
size: 0.5,
source: 20687,
target: 8205 });
// adding node
var x_node = Math.cos(2 * 17 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 17 * Math.PI / N) * 10;
g.nodes.push({
id: 20655,
label: 'PROJECT: Bacterial Transmembrane Signaling',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_figura14-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/project/bacterial-transmembrane-signalling/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 461120655,
size: 0.5,
source: 4611,
target: 20655,
});
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4147) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206554147,
size: 0.5,
source: 20655,
target: 4147 });
//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: 100983,
label: 'Loïc Hellio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-loic-hellio-20210203-143852-scaled-e1615974551120-150x150.jpg',
page_url: 'https://research.pasteur.fr/fr/member/loic-hellio/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 20655100983,
size: 0.5,
source: 20655,
target: 100983 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4624) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206554624,
size: 0.5,
source: 20655,
target: 4624 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 117296) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 20655117296,
size: 0.5,
source: 20655,
target: 117296 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4611) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206554611,
size: 0.5,
source: 20655,
target: 4611 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4046) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206554046,
size: 0.5,
source: 20655,
target: 4046 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4148) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 206554148,
size: 0.5,
source: 20655,
target: 4148 });
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) {
});