Commit e95ca890 authored by marc's avatar marc Committed by marc duez
Browse files

scatterplot.js : d3v5 drag function has changed

this is useless so currently disabled
parent 8902397b
......@@ -330,9 +330,13 @@ ScatterPlot.prototype = {
if (self.m.clone(p.id)
.isFocus()) return "circle_focus";
return "circle";
})
//Appel de la fonction drag
.call(this.force.drag)
})
/*
.call(d3.drag()
.on("start", function(d){return self.dragstarted(d)})
.on("drag", function(d){return self.dragged(d)})
.on("end", function(d){return self.dragended(d)}))
*/
//Action -> Si la souris est pointée/fixée sur un cercle, alors on affiche l'information concernant ce cercle
.on("mouseover", function(d) {
self.m.focusIn(d.id);
......@@ -340,10 +344,30 @@ ScatterPlot.prototype = {
//Action -> Si l'on clique sur un cercle, alors on le sélectionne
.on("click", function(d) {
self.clickNode(d.id);
})
});
},
/*
dragstarted: function(d)
{
if (!d3.event.active) this.simulation.alphaTarget(.7).restart();
d.fx = d.x;
d.fy = d.y;
},
dragged: function(d)
{
d.fx = d3.event.x;
d.fy = d3.event.y;
},
dragended: function(d)
{
if (!d3.event.active) this.simulation.alphaTarget(.7).restart();
d.fx = null;
d.fy = null;
},
/*
/**
* Function which allows to return the number of active clones
* @return {integer}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment