informatics-isi-edu / openseadragon-viewer

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

Annotation save bug #77

Closed rastogi-bhavya closed 3 years ago

rastogi-bhavya commented 3 years ago

Solution to #68

Made changes to exportToSVG of annotation-svg.js and annotation-group.js to make sure that, when no valid content (i.e. empty string) is being returned from there children indicating that no annotation object is present, these function would also return empty string/array. Returning empty ensures that when the user clicks on Save before actually drawing any annotation, an error will show up.

rastogi-bhavya commented 3 years ago

Did the testing, everything worked fine.

rastogi-bhavya commented 3 years ago

Added change to annotation-tool.js so that, when an anatomy is changed, the cursor is selected and any existing draw tool is deselected. Doing this makes sure that bug explained in #80 does not occur.