Figured it out
var selected = picker.getSelection({
x: Math.floor(event.x * (picker.width / canvasWidth)),
y: picker.height - Math.floor(event.y * (picker.height / canvasHeight))
});
if (selected.length > 0) {
if (selected[0].name && selected[0].name.includes("Text Element")) {
//Text element entity
console.log(selected[0].node._parent);
} else {
//Non text entity
console.log(selected[0].node);
}
}