I have an svg element in my HTML code:
<svg id="drawingPad"></svg>
Then, in my script I have this call:
var drawingPad = SVG('drawingPad').size('100%', '100%').fixSubPixelOffset()
Logging with console.log(drawingPad)
and console.log($document[0].getElementById('drawingPad'))
results in
SVG.Doc.SVG.invent.create {parent: svg#drawingPad, _stroke: "#000000", trans: Object, node: svg#drawingPad, type: "svg"…}
and
<svg id="drawingPad"></svg>
showing that SVG.js seems to correctly create its SVG.Doc element, but it doesn't seem to affect the HTML / DOM.
This happens whenever* I get to the page containing my SVG element by $location.path('/editor')
. When I directly go there or when I reload, everything works correctly.
*Actually, I need to visit pages in between to re-trigger it. If I just go back and click the link again, it works, too!
So I'm stumped. Does anyone here have any idea what could be going on here?