Issue 1080: bug fix for Full Calendar month mode event positioning
Status:  Duplicate
Merged:  issue 762
Owner: ----
Closed:  Sep 2011
Reported by v...@san.rr.com, Aug 15, 2011
In Month view in version 1.4.11 and 1.5.1 the seg.outerHeight value of hidden events (those for which eventRender returned false) is left “undefined” and is then used to calculate “top” for other events sharing the same day. This can cause events to overlay because top is 0 for one or more events in the same day.    I fixed it by simply checking "if (typeof seg.outerHeight != "undefined")" before adding seg.outerHeight to top. See line below in renderDaySegs() function with comment "*** ADDED CONDITION TO THIS LINE TO FIX BUG ***"

      function renderDaySegs(segs, modifiedEventId) {
              
              var segmentContainer = getDaySegmentContainer();
              var rowDivs;
              var rowCnt = getRowCnt();
              var colCnt = getColCnt();
              var i = 0;
              var rowI;
              var levelI;
              var colHeights;
              var j;
              var segCnt = segs.length;
              var seg;
              var top;
              var k;
              segmentContainer[0].innerHTML = daySegHTML(segs); // faster than .html()
              daySegElementResolve(segs, segmentContainer.children());
              daySegElementReport(segs);
              daySegHandlers(segs, segmentContainer, modifiedEventId);
              daySegCalcHSides(segs);
              daySegSetWidths(segs);
              daySegCalcHeights(segs);
              rowDivs = getRowDivs();
              // set row heights, calculate event tops (in relation to row top)
              for (rowI=0; rowI<rowCnt; rowI++) {
                     levelI = 0;
                     colHeights = [];
                     for (j=0; j<colCnt; j++) {
                           colHeights[j] = 0;
                     }
                     while (i<segCnt && (seg = segs[i]).row == rowI) {
                           // loop through segs in a row
                           top = arrayMax(colHeights.slice(seg.startCol, seg.endCol));
                           seg.top = top;
                           if (typeof seg.outerHeight != "undefined") top += seg.outerHeight;   // *** ADDED CONDITION TO THIS LINE TO FIX BUG ***
                           for (k=seg.startCol; k<seg.endCol; k++) {
                                  colHeights[k] = top;
                           }
                           i++;
                     }
                     rowDivs[rowI].height(arrayMax(colHeights));
              }
              daySegSetTops(segs, getRowTops(rowDivs));
       }


Sep 29, 2011
Project Member #1 adamrs...@gmail.com
Is this a bugfix for  issue 762 ? seems like it (or it is very related). i will merge...
Status: Duplicate
Mergedinto: 762