openseadragon / svg-overlay

An OpenSeadragon plugin that adds SVG overlay capability.
BSD 3-Clause "New" or "Revised" License
58 stars 28 forks source link

SVG Overlay #36

Open PpyMohan opened 5 years ago

PpyMohan commented 5 years ago

Hi, i have few doubt's ,

  1. is that possible to add fabricjsOverlay on svgOverlay?
  2. Clear svg overlay and add new overlay.
  3. Need help in Arrow head. i am not able to add arrow head
iangilman commented 5 years ago
is that possible to add fabricjsOverlay on svgOverlay?

I believe that's discussed in https://github.com/openseadragon/svg-overlay/issues/35.

Clear svg overlay and add new overlay.

You don't need to remove the overlay

You should be able to clear the overlay however you normally work with SVG. Are you using D3 or just straight SVG? I think in D3 it would be something like:

d3.select(viewer.svgOverlay().node()).selectAll("*").remove();
Need help in Arrow head. i am not able to add arrow head

You would just draw an arrowhead however you normally would in SVG. For instance you might take a look at the marker feature of SVG:

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker