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
|
// this is to save your console to a map
|
||||||
function saveToMap() {
|
function saveToMap() {
|
||||||
var Coor = "";
|
var nodes_data = "", syapses_data = "";
|
||||||
Mconsole.graph.eachNode(function(n) {
|
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);
|
Mconsole.graph.eachAdjacence(function(adj) {
|
||||||
$('#map_topicsToMap').val(Coor);
|
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');
|
$('#new_map').fadeIn('fast');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// this is for hiding one topic from your canvas
|
// this is for hiding one topic from your canvas
|
||||||
function removeFromCanvas(topic_id) {
|
function removeFromCanvas(topic_id) {
|
||||||
var node = Mconsole.graph.getNode(topic_id);
|
var node = Mconsole.graph.getNode(topic_id);
|
||||||
|
|
Loading…
Reference in a new issue