Commit 57bba12c authored by Maxime Chazalviel's avatar Maxime Chazalviel

Merge tag 'fix_coord' into develop

parents 26658301 d82c700c
......@@ -7,7 +7,7 @@
/**
* The version of the application.
*/
"version": "2.6.3",
"version": "2.6.4",
/**
* The relative path to the application's markup file (html, jsp, asp, etc.).
......
......@@ -165,7 +165,6 @@ metExploreD3.GraphFunction = {
},
horizontalAlign : function(panel) {
metExploreD3.GraphNode.fixSelectedNode();
var nodes = _metExploreViz.getSessionById(panel).getSelectedNodes();
var yRef = _metExploreViz.getSessionById(panel).getD3Data().getNodeById(nodes[0]).y;
......@@ -193,16 +192,15 @@ metExploreD3.GraphFunction = {
}
}
})
metExploreD3.GraphNode.fixSelectedNode();
metExploreD3.GraphNetwork.tick(panel);
},
verticalAlign : function(panel) {
metExploreD3.GraphNode.fixSelectedNode();
var nodes = _metExploreViz.getSessionById(panel).getSelectedNodes();
var xRef = _metExploreViz.getSessionById(panel).getD3Data().getNodeById(nodes[0]).x;
var arrayNode = [];
d3.select("#"+panel).select("#D3viz").select("#graphComponent").selectAll("g.node")
.filter(function(node){
......@@ -213,7 +211,7 @@ metExploreD3.GraphFunction = {
node.px = xRef ;
node.x = xRef ;
});
arrayNode.sort(function(node1, node2){
return d3.ascending(node1.y, node2.y);
});
......@@ -225,8 +223,9 @@ metExploreD3.GraphFunction = {
node.y = arrayNode[i-1].y+30 ;
}
}
})
});
metExploreD3.GraphNode.fixSelectedNode();
metExploreD3.GraphNetwork.tick(panel);
},
......
......@@ -1033,7 +1033,6 @@ metExploreD3.GraphPanel = {
metExploreD3.displayMessageYesNo("Coodinates",'Do you want keep node coordinates.',function(btn){
if(btn=="yes")
{
metExploreD3.GraphNetwork.refreshViz("viz");
var selected = [];
oldCoodinates.forEach(function(coor){
var node = networkData.getNodeById(coor.id);
......@@ -1052,7 +1051,7 @@ metExploreD3.GraphPanel = {
.each(function(d) {
d.setLocked(!d.isLocked());
d.fixed=d.isLocked();
if(isLocked())
if(d.isLocked())
metExploreD3.GraphNode.fixNode(d);
});
......@@ -1060,7 +1059,8 @@ metExploreD3.GraphPanel = {
.selectAll("g.node")
.filter(function(d) { return selected.indexOf(d.id)!=-1; })
.each(function(d) { _MyThisGraphNode.selection(d, "viz"); });
metExploreD3.GraphNetwork.tick("viz");
}
});
}
......
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