add drag & drop functionality
Opened this issue · 2 comments
do3meli commented
add drag & drop functionality so one could move a chart from one place to another.
maglub commented
Commit fb70bab deals with this in https://github.com/maglub/piLogger/blob/master/include/templates/index.html and https://github.com/maglub/piLogger/blob/master/include/templates/macros.html
- I had to simplify the div structure in the macro.html, so that the graph box now has one div-level less.
- Dragging a graph, dropping it on another graph, will put the source graph before the destination graph.
Even if this is now pushed into master, there is a bit of cleanup to do:
"class: column" should be renamed to something more descriptive, and corresponding names in the javascript code should be updated
"class: arne-dase" must for sure be renamed to something better
maglub commented
To further make this persistent in the database, we will need to:
- Give the div id's unique names, so that we can reference exactly which graph was put where in which order
- Add a rest call to reflect this, and update the database