diff --git a/VQI_PathwayEditor.js b/VQI_PathwayEditor.js index 8647d35..af9225c 100755 --- a/VQI_PathwayEditor.js +++ b/VQI_PathwayEditor.js @@ -2152,7 +2152,7 @@ var VQI_PathwayEditor = function (parent) { } self.produceJSONExternalNoGUI = function(){ - download(states[states.length - 1], "data.txt", "text/plain"); + download(self.json, "data.txt", "text/plain"); } self.sprayColorExternalNoGUI = function (list) { diff --git a/index.php b/index.php index fa66ef1..4f7c587 100644 --- a/index.php +++ b/index.php @@ -17,6 +17,7 @@ +
@@ -58,6 +59,9 @@ function sprayFromFile() { function print() { objVQI_PathwayEditor.printGraph(); } + function save() { + objVQI_PathwayEditor.produceJSONExternalNoGUI(); + } document.getElementById("file").addEventListener("change", sprayFromFile);