Closed rastogi-bhavya closed 4 years ago
@rastogi-bhavya alongside svgID
in both cases I'm also sending the groupID
. So you should change both of your functions to take that into account. You don't need to save/discard all the groups in that svg file
Resolution of #42
The solution works as follows. First, when the
Edit
button is clicked, the program creates a copy of the annotation (an SVG file) by calling theexportToSVG
function. When theBack
button is clicked, the annotations that was edited is removed and then re-loaded using the copy that was created earlier. This makes sure that the state of the SVG is consistent.One improvement that can be made is that, when the back button is clicked, I could check to see if any changes have been made to the annotation, before removing the annotation and re-loading it. This could save some time as it would remove unnecessary file handling, but increase the time in comparison of the two files (copy of the original annotation and current annotation).