informatics-isi-edu / openseadragon-viewer

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

Arrowheads are not displayed properly #104

Open RFSH opened 1 year ago

RFSH commented 1 year ago

The arrowheads are not displayed correctly in all browsers.

You can see an example of it here.

Chrome: Screen Shot 2023-03-28 at 11 02 58 AM

Firefox: Screen Shot 2023-03-28 at 11 03 52 AM

Safari: Screen Shot 2023-03-28 at 11 03 26 AM

nikhiilll commented 1 year ago

The feature is currently not functioning due to a problem with the marker end definition in the SVG element. In Chrome, using a relative URL for the marker end works correctly. However, in other browsers, a static URL is necessary for the feature to work properly. Several Stack Overflow posts have recommended using a static URL as the solution.

  1. Using base tag on a page that contains SVG marker elements fails to render markers
  2. Externally defined markers don't appear in SVG

These posts offer insights into resolving the issue. To address the problem, you can choose one of two options: either include the CHAISE URL visible in the browser or utilize the mview.html URL of the OpenSeadragon viewer application. Implementing either of these URLs should help resolve the bug.

RFSH commented 1 year ago

I spent a lot of time looking at the issue, and the previous comment about absolute vs. relative path was irrelevant to our case. I resolved the Firefox bug by adding the vector-effect: non-scaling-stroke property to the created path in the marker definitions.

Related to Safari,