I'm using the Area object in the onBeforeCellRender to draw a red circel indicating the existing of a comment (s. attached screenshot). This works fine, however I'm struggling with showing the bubble and the onClick event doesn't fire either. Am I doing something wrong?
onBeforeCellRender: (args) => {
this.setDaysColor(args);
let comments = this.data.find(d => d.personId == args.cell.resource);
let comment = comments.commentEntries.find(c => args.cell.start.equals(new DayPilot.Date(c.date)));
if (comment) {
let isEditable = !this.personService.CurrentPerson.isDateLocked(moment(args.cell.start.value))
&& comment.allowModify
args.cell.properties.areas = [
{
onClick: (args) => {
if (isEditable) {
this.showCommentDialog(args);
}
},
action: 'Bubble',
bubble: new DayPilot.Bubble({
zIndex: 500,
onLoad: (args) => { args.html = comment.comment; console.log(comment.comment)}
}),
height: 6,
width: 6,
visibility: "Visible",
bottom: 1,
left: 1,
style: "border: 1px solid red; border-radius: 5px; box-sizing: border-box; background-color: red;"
}
];
}
},