So I'm stuck on this problem for around a week, tried different approaches and having a hard time coming up with a solution.
What I'm trying to achieve is to fit blocks horizontally inside another block.
Overlapping blocks would be "pushed" horizontally, blocks should resize to fit the container block.
Please see images, hope it makes more sense.
Can anyone point me to the right direction here?
I'm trying to come up with a solution for displaying a time schedule. The black outline can be considered as a "day" and the red boxes are the "events" in that day. Each event has a start and an end time, hence the different lengths.
The two images are two examples of how the events should be organaized with two different sets of input.
Overlapping events means that their start and end times hits other events duration.
The goal is to stack the events from left to right in case of overlapping while resize and position them accordingly.