first of all, I think the idea of object-oriented programming is just understandable if you are born later then 1980 ;). So please be kind, I'm much older.
My problem, I'm trying to get an Object into an Array, to make it easier to access it. I tried it with the below code, but when I try to access the Object, I get the error message, that it is undefined. Please give me a hint, where I have a error in my thinking.
var axles=[];
axles[0] = makeMySvg('holes.svg', 100, 100)
function makeMySvg(urlName, posx, posy)
{
fabric.loadSVGFromURL(urlName,function(objects)
{
obj = new fabric.util.groupSVGElements(objects, {
//left: versatzx-14, // 1/2 breite 28px hoehe 33px
//top: versatzy+axpos1/10*factor,
top: posx,
left:posy,
opacity: 1,
scaleX: 1,
scaleY: 1,
objectCaching: true
});
canvas.add(obj);
canvas.renderAll();
return obj;
});
}
axles[0].scaleX=10;