Don't overlap events in single day view (code from http://code.google.com/p/fullcalendar/issues/detail?id=218)
This commit is contained in:
parent
2dc025959c
commit
60635448fb
1 changed files with 8 additions and 4 deletions
|
@ -3803,7 +3803,8 @@ function AgendaEventRenderer() {
|
||||||
height,
|
height,
|
||||||
slotSegmentContainer = getSlotSegmentContainer(),
|
slotSegmentContainer = getSlotSegmentContainer(),
|
||||||
rtl, dis, dit,
|
rtl, dis, dit,
|
||||||
colCnt = getColCnt();
|
colCnt = getColCnt(),
|
||||||
|
overlapping = colCnt > 1;
|
||||||
|
|
||||||
if (rtl = opt('isRTL')) {
|
if (rtl = opt('isRTL')) {
|
||||||
dis = -1;
|
dis = -1;
|
||||||
|
@ -3830,8 +3831,11 @@ function AgendaEventRenderer() {
|
||||||
outerWidth = availWidth / (levelI + forward + 1);
|
outerWidth = availWidth / (levelI + forward + 1);
|
||||||
}else{
|
}else{
|
||||||
if (forward) {
|
if (forward) {
|
||||||
// moderately wide, aligned left still
|
if (overlapping) { // moderately wide, aligned left still
|
||||||
outerWidth = ((availWidth / (forward + 1)) - (12/2)) * 2; // 12 is the predicted width of resizer =
|
outerWidth = ((availWidth / (forward + 1)) - (12/2)) * 2; // 12 is the predicted width of resizer =
|
||||||
|
}else{
|
||||||
|
outerWidth = outerWidth = availWidth / (forward + 1);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
// can be entire width, aligned left
|
// can be entire width, aligned left
|
||||||
outerWidth = availWidth;
|
outerWidth = availWidth;
|
||||||
|
@ -3842,7 +3846,7 @@ function AgendaEventRenderer() {
|
||||||
* dis + (rtl ? availWidth - outerWidth : 0); // rtl
|
* dis + (rtl ? availWidth - outerWidth : 0); // rtl
|
||||||
seg.top = top;
|
seg.top = top;
|
||||||
seg.left = left;
|
seg.left = left;
|
||||||
seg.outerWidth = outerWidth;
|
seg.outerWidth = outerWidth - (overlapping ? 0 : 1);
|
||||||
seg.outerHeight = bottom - top;
|
seg.outerHeight = bottom - top;
|
||||||
html += slotSegHtml(event, seg);
|
html += slotSegHtml(event, seg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue