informatics-isi-edu / openseadragon-viewer

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

Added arrowline annotation tool #99

Closed nikhiilll closed 2 years ago

nikhiilll commented 2 years ago

Implementation

This pull request adds the arrow line annotation tool to the viewer app. To implement this functionality, I used the SVG line shape and added an arrowhead to the end of this line. This was done using the marker-end attribute that can be added to the <line /> tag. In the marker-end attribute the URL of an SVG definition needs to be given. So, we create an SVG marker definition for the arrowhead, add it to the SVG definitions - defs tag and reference the URL for this in the line attribute.

Changes

Misc The PR might show other file changes, but those are due to the formatting being updated for the files. The exact lines for code changes are below:

nikhiilll commented 2 years ago

Closing this PR as discussed, will undo the formatting changes and raise another PR with just the code changes.