I have tried many thing like calculating location, handling with the event we do have in original fabricjs. Does any have done this before?
This worked for me:
// create a group let group = new fabric.Group([circle, rect], { subTargetCheck: true }); canvas.on('mouse:down', function (e) { // clicked item will be console.log(e.subTargets[0]) });