Skip to content
Advertisement

Tag: snap.svg

How can I get an ID from SVG file using javascript

I’m having difficulties in accessing an ID that is inside an SVG file and inside of a rect tag, to manipulate the SVG’s I’m using the Snap.svg library. In this case I want to get the get the id=”rect252″ in javacript file and change the visibility of this object. For some reason I’m not able to get this ID. My

How can I use snap.svg with external files?

I know I can use an inline <svg> element to load snap svg. However I would like to use an non-inlined file via an <img> element: Where someGroup is an svg g element, fails. group is null. Additionally: Shows this is an Element rather than a Snap instance. How can I use snap.svg with external files? Answer Use the Paper.image

Advertisement