informatics-isi-edu / openseadragon-viewer

2D viewer with openseadragon
Apache License 2.0
5 stars 2 forks source link

Undo changes on back click #42

Closed rastogi-bhavya closed 4 years ago

rastogi-bhavya commented 4 years ago

when part of the SVG is erased, and the back button is clicked then, the part that was erases remains erased, i.e. it is not undone.

Correct behavior: When the back button is clicked undo every change that was made.

rastogi-bhavya commented 4 years ago

Solutions

  1. When the save button is clicked, save the SVG of the anatomy that is being edited. If the Back button is clicked after making some edits, remove the original anatomy and re-add it using the SVG that was saved when the save button was clicked.

  2. Make a cyclic copy of the anatomy SVG object that is being edited. If the Back button is clicked then after making some changes, then use the original copy of the object (without the changes) to bring the anatomy to the original state.