I need to create circles in canvas using fabric. Every click, there is a circle created. However, if the new circle created it will replace old circle
HTML
<canvas #canvas id="canvas" width="900" height="400" >
<p>Your browser doesn't support canvas!</p>
</canvas>
TS
this.canvas = new fabric.Canvas('canvas');
var circle = new fabric.Circle({
radius: 20,
fill: '#eef',
originX: 'center',
originY: 'center'
});
var text = new fabric.Text(`${data.data.name}`, {
fontSize: 30,
originX: 'center',
originY: 'center'
});
this.group = new fabric.Group([circle, text], {
left: event.e.offsetX,
top: event.e.offsetY,
angle: 0
});
console.log(this.group);
this.canvas.add(this.group);
this.canvas.setActiveObject(this.canvas.item[0]);
this.canvas.renderAll();