Issue 2148: [Day view] - The first event is overlapping the second of the line (same date and hour)
Status:  Done
Owner: ----
Closed:  Jun 2014
Reported by luiz.naz...@gmail.com, May 12, 2014
Hello,
I'm not sure if it's really a bug or something, but it was bothering me and I was told to fix it. And I like to share the solution I found.

The problem is, like I said on the summary, "The first event is overlapping the second of the line". Basically, the first event has the "width" property of the respective <div> with "width" doubled, and when the mouse is over the first event it overlap the second. Also, it generate others "visualizations bugs".

Don't need any public demonstration, the images say for itself.

Is this really a bug or an unexpected behavior??

The way I found to fix it was changing the following codes:

- fullcalendar.js [about line 3866]:
if (levelI) {
  // indented and thin
  outerWidth = availWidth / (levelI + forward + 1);
  }else{
    if (forward) {
      // moderately wide, aligned left still
      outerWidth = ((availWidth / (forward + 1)) - (12/2)) * 2; // 12 is the predicted width of resizer =
    }else{
      // can be entire width, aligned left
      outerWidth = availWidth;
  }
}
 == Changed: ==
if (!(levelI) && !(forward)) {
  outerWidth = availWidth;
}else{
  outerWidth = availWidth / (levelI + forward + 1);
}

-fullcalendar.min.js:
p=f?g/(f+d+1):d?2*(g/(d+1)-6):g
 == Changed: ==
p=!f&&!d?p=g:p=g/(f+d+1)


Sorry for any misspelling,
Luiz
bugBefore.png
22.4 KB   View   Download
bugAfter.png
44.2 KB   View   Download
May 14, 2014
#1 luiz.naz...@gmail.com
Observation:
When I call the fullCalendar funciton, I declare the property:
"slotEventOverlap: false"
And has no other javascript or css files.
Jun 7, 2014
Project Member #2 adamrs...@gmail.com
Everything seems to be working as intended. The first screenshot in the first image (when slotEventOverlap is false) looks good. The second screenshot in the first image seems messed up only because the z-index of the events seem to have gotten messed up, resulting in one event being completely obscured. This is likely due to your code or some other plugin. The second image (when slotEventOverlap is true) looks good.
Status: Done
Jun 9, 2014
#3 luiz.naz...@gmail.com
Well, this was a big misunderstanding...

When I call fullcalendar function, the property "slotEventOverlap" was false, what results in the event's overlapping...

I was doing as the Documentation explains: http://arshaw.com/fullcalendar/docs/agenda/slotEventOverlap/
According to the documentation: when it's true, the events will overlap, when it's false, they don't.

So, I thought that it was a error in the FullCallendar's code and "fixed" it.

Please, correct the documentation! :)
Jun 9, 2014
Project Member #4 adamrs...@gmail.com
I'm still not convinced it is an error with the documentation or in fullcalendar's code. This behavior was fixed and slotEventOverlap introduced in 1.6.4. If you version is below that, then that is the problem.

If you are setting slotEventOverlap to `false` and the events are still overlapping, and you have 1.6.4 or higher, then there is some sort of bug. If so, please follow the bug report submission guidelines and include a recreation of the bug through JSFiddle:

http://arshaw.com/fullcalendar/wiki/Reporting-Bugs/