From 4547036d39ae6b547326676d8118465a837dcaba Mon Sep 17 00:00:00 2001 From: chrono Date: Sat, 30 Nov 2013 18:03:04 +0100 Subject: [PATCH] Added feature to add points while editing --- public/assets/js/picoreflow.js | 6 ++++++ public/index.html | 1 + 2 files changed, 7 insertions(+) diff --git a/public/assets/js/picoreflow.js b/public/assets/js/picoreflow.js index 9ef7e23..455fb04 100644 --- a/public/assets/js/picoreflow.js +++ b/public/assets/js/picoreflow.js @@ -117,7 +117,13 @@ function leaveEditMode() { } +function addNewPoint() { + console.log(graph.profile.data); + graph.profile.data.push([parseInt(graph.profile.data[graph.profile.data.length-1][0])+15, 25]); + graph.plot = $.plot("#graph_container", [ graph.profile, graph.live ], getOptions()); + console.log(graph.profile.data); +} function saveProfile() diff --git a/public/index.html b/public/index.html index 40db960..014026f 100644 --- a/public/index.html +++ b/public/index.html @@ -64,6 +64,7 @@ +