| Issue 2139: | Reference to issue #259 windowResize fail | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Exemple: http://jsfiddle.net/rK5ZK/ A solution would implement something like below: Adjust on the following functions in fullcalendar.js v2.0.0-beta2 (not min.js): line 3167 function setWidth(width) { viewWidth = width; colPositions.clear(); colContentPositions.clear(); weekNumberWidth = 0; if (showWeekNumbers) { weekNumberWidth = head.find('th.fc-week-number').outerWidth(); } colWidth = Math.floor((viewWidth - weekNumberWidth) / colCnt); // // CHANGE - REMOVE SLICE //setOuterWidth(headCells.slice(0, -1), colWidth); // setOuterWidth(headCells, colWidth); } line 3954 function setWidth(width) { viewWidth = width; colPositions.clear(); colContentPositions.clear(); var axisFirstCells = dayHead.find('th:first'); if (allDayTable) { axisFirstCells = axisFirstCells.add(allDayTable.find('th:first')); } axisFirstCells = axisFirstCells.add(slotTable.find('th:first')); axisWidth = 0; setOuterWidth( axisFirstCells .width('') .each(function(i, _cell) { axisWidth = Math.max(axisWidth, $(_cell).outerWidth()); }), axisWidth ); var gutterCells = dayTable.find('.fc-agenda-gutter'); if (allDayTable) { gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter')); } var slotTableWidth = slotScroller[0].clientWidth; // needs to be done after axisWidth (for IE7) gutterWidth = slotScroller.width() - slotTableWidth; if (gutterWidth) { setOuterWidth(gutterCells, gutterWidth); gutterCells .show() .prev() .removeClass('fc-last'); }else{ gutterCells .hide() .prev() .addClass('fc-last'); } colWidth = Math.floor((slotTableWidth - axisWidth) / colCnt); // // CHANGE - REMOVE SLICE //setOuterWidth(dayHeadCells.slice(0, -1), colWidth); // setOuterWidth(dayHeadCells, colWidth); } ******** And to set more speed to reset all the widths of cells, change: line 785 function windowResize() { if (!ignoreWindowResize) { if (currentView.start) { // view has already been rendered var uid = ++resizeUID; setTimeout(function() { // add a delay if (uid == resizeUID && !ignoreWindowResize && elementVisible()) { if (elementOuterWidth != (elementOuterWidth = element.outerWidth())) { ignoreWindowResize++; // in case the windowResize callback changes the height updateSize(); currentView.trigger('windowResize', _element); ignoreWindowResize--; } } // // CHANGE - NEW VALUE //}, 200); // }, 5); }else{ // calendar must have been initialized in a 0x0 iframe that has just been resized lateRender(); } } } ******* Put this adjustments in the next version of fullcalendar, please?
Jun 10, 2014
im merging this with the original issue and continuing the discussion there...
Status:
Duplicate
Mergedinto: 259 |
|
| ► Sign in to add a comment |
Labels: Type-Bug