mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-27 11:22:18 +08:00
resize event to different week (issue 308), necessary event rendering refactoring
This commit is contained in:
+11
-2
@@ -25,6 +25,7 @@ function BasicView(element, calendar, viewName) {
|
||||
t.colContentLeft = colContentLeft;
|
||||
t.colContentRight = colContentRight;
|
||||
t.dayOfWeekCol = dayOfWeekCol;
|
||||
t.dateCell = dateCell;
|
||||
t.cellDate = cellDate;
|
||||
t.cellIsAllDay = function() { return true };
|
||||
t.allDayTR = allDayTR;
|
||||
@@ -335,7 +336,7 @@ function BasicView(element, calendar, viewName) {
|
||||
|
||||
|
||||
function renderSelection(startDate, endDate, allDay) {
|
||||
renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true);
|
||||
renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); // rebuild every time???
|
||||
}
|
||||
|
||||
|
||||
@@ -427,7 +428,15 @@ function BasicView(element, calendar, viewName) {
|
||||
|
||||
|
||||
function dayOfWeekCol(dayOfWeek) {
|
||||
return (dayOfWeek - Math.max(firstDay,nwe)+colCnt) % colCnt;
|
||||
return (dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt;
|
||||
}
|
||||
|
||||
|
||||
function dateCell(date) {
|
||||
return {
|
||||
row: Math.floor(dayDiff(date, t.visStart) / 7),
|
||||
col: dayOfWeekCol(date.getDay())*dis + dit
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user