Added feature to add points while editing
This commit is contained in:
parent
6ad5938de1
commit
4547036d39
@ -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()
|
||||
|
||||
@ -64,6 +64,7 @@
|
||||
<button class="btn btn-success" type="button" onclick="saveProfile();">Save</button>
|
||||
<button id="btn_exit" type="button" class="btn btn-danger" onclick="leaveEditMode()" style="display:none"><span class="glyphicon glyphicon-remove"></span></button>
|
||||
</span>
|
||||
<button id="btn_newpoint" type="button" class="btn btn-default" onclick="addNewPoint()"><span class="glyphicon glyphicon-plus"></span></button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user