search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

how do you show a custom resource tag on the resourcebubble event

Asked by Vincent
23 days ago.

I’m trying to see if I can show addition information on mouse over on row headers, which I passed as a tag when pushing the resource information. The tags don’t seem to show as a valid entry in the resourceBubble’s new bubble onLoad event.

For example, if i had:

RoomA with tag size: “small”
RoomB with tag size: “large”

and I wanted to display on mouse over the size of the room in a bubble, how could I do this?

Answer posted by Dan Letecky [DayPilot]
17 days ago.

The resource bubble receive a simplified resource object with basic information only. However, you can use it to load the full DayPilot.Row object like this:

resourceBubble: new DayPilot.Bubble({
  onLoad: args => {
      const r = dp.rows.find(args.source.id);
      const size = r.data.tags?.size;
      args.html = `Size: ${size}`;
  }
})

This assumes the resources specify the size value using the tags property:

const resources = [
  {name: "Room 1", id: "A", tags: {size: 5 }},
  // ...
];
dp.update({resources});
New Reply
This reply is
Attachments:
or drop files here
Your name (optional):