diff --git a/chaostest/connected-lines.html b/chaostest/connected-lines.html index 7be22e4..bb6c0f7 100644 --- a/chaostest/connected-lines.html +++ b/chaostest/connected-lines.html @@ -28,6 +28,8 @@ function get_svg() { window.onload = function() { paper.install(window); paper.setup(document.getElementById('canvas')); + var editor; + rnd_params(); draw(); @@ -40,11 +42,13 @@ window.onload = function() { a.click(); }); - document.getElementById('draw').addEventListener('click', function() { + document.getElementById('new').addEventListener('click', function() { + rnd_params(); + editor.setValue(params); draw(); }); - var editor = new JSONEditor(document.getElementById('params'), { + editor = new JSONEditor(document.getElementById('params'), { no_additional_properties: true, disable_edit_json: true, disable_properties: true, @@ -102,7 +106,7 @@ window.onload = function() {
- +