summaryrefslogtreecommitdiff
path: root/scripts/buttons.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-08-18 21:24:08 +0300
committerAlon Levy <alon@pobox.com>2014-08-18 21:27:01 +0300
commit59370f16a20cc56aaa61ca8a9a2aa62d418af22b (patch)
treef4c024f8c179a9ae2c73409ba3ec572530b59fc3 /scripts/buttons.js
parentbfe3c2b399eec1a0fa11dbdedab9ed9b4173835d (diff)
adding history, links & nodes only
no atomicity - nodes/links recorded as separate additions We record both temp (state == 'temp') and not temp nodes, can be filtered during analysis.
Diffstat (limited to 'scripts/buttons.js')
-rw-r--r--scripts/buttons.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/buttons.js b/scripts/buttons.js
index 8af525c2..824505d3 100644
--- a/scripts/buttons.js
+++ b/scripts/buttons.js
@@ -49,3 +49,10 @@ $('.set-user').click(function() {
$('.save-history').show();
})
});
+
+$('.save-history').click(function() {
+ if (graph.history === undefined) {
+ throw "History is undefined";
+ }
+ graph.history.save_to_file();
+});