Open RFSH opened 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.
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.
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,
The arrowhead is properly added to the SVG. The arrowhead is displayed using the proper scale in smaller images like this one. It's just not scaling properly, so in a huge image, you will only see the arrowhead if the image is zoomed all the way in.
This was the closest stackOverflow link that I could find to our case. I tried the described solutions, but none of them worked.
In this codepen, I was experimenting with different combinations of properties. Removing the vector-effect
from the arrow will ensure the line and arrowhead are scaled the way way, but as a result, the line becomes very thin, so we cannot use this method in our scenario.
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](https://user-images.githubusercontent.com/2129750/228328056-212c5828-2c8a-4044-91c9-7fd2e7aa4d1a.png)
Firefox:![Screen Shot 2023-03-28 at 11 03 52 AM](https://user-images.githubusercontent.com/2129750/228328306-e23183d1-0c8e-47b5-a615-6a4a5a5dc6e0.png)
Safari:![Screen Shot 2023-03-28 at 11 03 26 AM](https://user-images.githubusercontent.com/2129750/228328158-6d21eede-458b-4037-a17b-979a2e7e7025.png)