fabric.js loading a SVG as an object
<p>Im currently working with fabric.js and am attempting to load a SVG and have similar functionality as i do currently with rectangles (which i used to test)</p>

<p>What i can currently do is create a 
box1.on('moving', function()
{
  movetobox(box1a, box1)
});</p>

<p>to move a second rect(im refering to their objects as box1a and box1) to always be ontop of another.</p>

<p>But if i load a SVG, i am getting an undefined error when trying to refer to it using a on('moving').</p>

<p>i have created a JSfiddle to show my code easier</p>

<p><a href="https://jsfiddle.net/marak/5tvdu532/?utm_source=website&amp;utm_medium=embed&amp;utm_campaign=5tvdu532" rel="nofollow">https://jsfiddle.net/marak/5tvdu532/?utm_source=website&amp;utm_medium=embed&amp;utm_campaign=5tvdu532</a></p>

<p>now this works for rects:</p>

<pre><code>box1.on('moving', function() {
  movetobox(box1a, box1)
});
</code></pre>

<p>but this doesnt work for SVG's</p>

<pre><code>box1SVG.on('moving', function() {
  moveSVGtobox();
});
</code></pre>

<p>(note both functions do the same thing, their on the JSFiddle).</p>

<p>Is there another way to load in a SVG that allows me to reference it the same as a rect?  Im going to have quite a few of them, and each has to be able to align with different objects and be accessable through code.</p>

<ul>
<li>Marak</li>
</ul>