In the below code how can I use options array which is passed as a argument to drawOval
drawOval=function(options) {
$triangle = new Triangle({
// how can I use options array here
// the format it accept is top:450,
// left:500,width:200
});
};
opt = new Array(
top: 450,
left: 500,
width: 200,
height: 200,
fill: 'rgb(204,0,107)'
);
drawOval(opt);
Basically I need an object not array.
opt= {
top:100,
left:200,
width:200,
height:200,
fill:'rgb(12,0,107)'
}
drawOval(opt);