changed savedToMap() function so that it also includes all synapses
This commit is contained in:
parent
a7d4debd02
commit
e2c408f983
1 changed files with 9 additions and 6 deletions
|
@ -115,16 +115,19 @@ function saveLayout(id) {
|
|||
|
||||
// this is to save your console to a map
|
||||
function saveToMap() {
|
||||
var Coor = "";
|
||||
var nodes_data = "", syapses_data = "";
|
||||
Mconsole.graph.eachNode(function(n) {
|
||||
Coor = Coor + n.id + '/' + n.pos.x + '/' + n.pos.y + ',';
|
||||
nodes_data += n.id + '/' + n.pos.x + '/' + n.pos.y + ',';
|
||||
});
|
||||
Coor = Coor.slice(0, -1);
|
||||
$('#map_topicsToMap').val(Coor);
|
||||
Mconsole.graph.eachAdjacence(function(adj) {
|
||||
synapses_data += adj.id + ',';
|
||||
}
|
||||
nodes_data = nodes_data.slice(0, -1);
|
||||
$('#map_topicsToMap').val(nodes_data);
|
||||
$('#map_synapsesToMap').val(synapses_data);
|
||||
$('#new_map').fadeIn('fast');
|
||||
}
|
||||
|
||||
|
||||
// this is for hiding one topic from your canvas
|
||||
function removeFromCanvas(topic_id) {
|
||||
var node = Mconsole.graph.getNode(topic_id);
|
||||
|
@ -168,4 +171,4 @@ function MconsoleReset() {
|
|||
var mY = Mconsole.canvas.scaleOffsetY;
|
||||
Mconsole.canvas.scale((1/mX),(1/mY));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue