Scheduler overlapped events display priority
Scheduler overlapped events display priority
My scheduler has 2 events overlapped with each other. I want to arrange the display priority of the events (which event display in the front or in the back).

I try to sort the events from the priority like this
, but it didn't work.
I want to display milestone event in the front and log bar event in the back.
Is there a way to prioritize the overlapped events display order?

I try to sort the events from the priority like this
Code: Select all
events[0].seq = 2; // long bar event
events[1].seq = 1; // milestone event
// sort event by seq
events.sort((a, b) => {
if (a.seq < b.seq) return -1;
if (a.seq > b.seq) return 1;
return 0;
});
I want to display milestone event in the front and log bar event in the back.
Is there a way to prioritize the overlapped events display order?
- Maxim Gorkovsky
- Core Developer
- Posts: 3309
- Joined: Wed Jan 08, 2014 11:46 am
Re: Scheduler overlapped events display priority
Hello.
Before we dive into rendering details, would setting higher z-index solve the issue? You can generate z-index during rendering:
Before we dive into rendering details, would setting higher z-index solve the issue? You can generate z-index during rendering:
Code: Select all
eventRenderer : ({ tplData }) => {
tplData.wrapperStyle = `z-index:${Math.round(Math.random() * 100)}`;
}