summaryrefslogtreecommitdiff
path: root/src/client/buttons.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-01-04 16:44:38 +0200
committerAlon Levy <alon@pobox.com>2015-01-05 13:23:57 +0200
commitff5c984089c19467304dbec0b87b2aa019717b13 (patch)
tree91a10398f03988516f44672078e3705b8d2555cb /src/client/buttons.js
parentd50ec127af2fe7c7276380e10fce00496580fd58 (diff)
initial graph_view introduction - mixing circle & force layouts
Diffstat (limited to 'src/client/buttons.js')
-rw-r--r--src/client/buttons.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/buttons.js b/src/client/buttons.js
index 860c8573..e29a1729 100644
--- a/src/client/buttons.js
+++ b/src/client/buttons.js
@@ -7,13 +7,13 @@ var key="#47989379";
$('.save a').click(function(){
- var json = rz_core.graph.save_to_json();
+ var json = rz_core.main_graph.save_to_json();
console.log('saving to local storage ' + json.length + ' bytes');
localStorage.setItem(key, json);
});
$('.export').click(function() {
- var json = rz_core.graph.save_to_json();
+ var json = rz_core.main_graph.save_to_json();
var filename = 'graph.json';
var blob = new Blob([json], {type: 'application/json'});
console.log('saving ' + json.length + ' bytes to ' + filename);
@@ -21,14 +21,14 @@ $('.export').click(function() {
});
$('.url-copy a').click(function() {
- var json = rz_core.graph.save_to_json();
+ var json = rz_core.main_graph.save_to_json();
// TODO use jquery BBQ $.param({json: json});
var encoded = document.location.origin + '/?json=' + encodeURIComponent(json);
window.prompt('Copy to clipboard: Ctrl-C, Enter (or Cmd-C for Mac)', encoded);
});
var really_load = function() {
- if (!rz_core.graph.empty()) {
+ if (!rz_core.main_graph.empty()) {
return confirm('All unsaved changes will be deleted, are you sure?');
}
return true;
@@ -73,10 +73,10 @@ logout_button.click(function() {
});
$('a.save-history').click(function() {
- if (rz_core.graph.history === undefined) {
+ if (rz_core.main_graph.history === undefined) {
throw "History is undefined";
}
- rz_core.graph.history.save_to_file();
+ rz_core.main_graph.history.save_to_file();
});
return {'buttons': 'nothing here'};
}); // define