Hello,
I would like to display between events B and C a particular colour as in the Nested Event Demo (https://bryntum.com/products/scheduler/examples/nestedevents/).
This works when the zoomLevel is greater than or equal to 7, if the zoom is less there is a significant offset.
I use the getDistanceForDuration function to calculate the position and size of the nestedEvent.
startDateMainEvent is the date of the event A.
offset.push({
... new OffsetMultiColorEventConfig(),
startOffset : this.getDistanceForDuration(startDateMainEvent, moment(startEvent.getData('startDate'))),
widthOffset: this.getDistanceForDuration(moment(startEvent.getData('startDate')), moment(endEvent.getData('endDate'))),
color: config.color + 'a3'
});
In the eventBodyTemplate I recalculate the position and size each time :
offset?.forEach((o, i) => {
result += `<div class="nested" style="left : ${o.startOffset}px; width: ${o.widthOffset}px; background-color : ${o.color}; border-radius: 2em; opacity : 0.8"></div>`;
})
Is there anything I am doing wrong? Can you help me to solve the problem please?
Thanks
Emma