mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-08-11 11:18:47 +08:00
Issue 17 - Fix to overlay issue - was overlaying on incorrect column when highlighting - forgot to grunt build output
This commit is contained in:
+16
-18
@@ -5167,22 +5167,20 @@ function ResourceView(element, calendar, viewName) {
|
||||
}
|
||||
|
||||
|
||||
function renderSlotOverlay(overlayStart, overlayEnd) {
|
||||
for (var i=0; i<colCnt; i++) {
|
||||
var dayStart = cellToDate(0, i);
|
||||
var dayEnd = addDays(cloneDate(dayStart), 1);
|
||||
var stretchStart = new Date(Math.max(dayStart, overlayStart));
|
||||
var stretchEnd = new Date(Math.min(dayEnd, overlayEnd));
|
||||
if (stretchStart < stretchEnd) {
|
||||
var rect = coordinateGrid.rect(0, i, 0, i, slotContainer); // only use it for horizontal coords
|
||||
var top = timePosition(dayStart, stretchStart);
|
||||
var bottom = timePosition(dayStart, stretchEnd);
|
||||
rect.top = top;
|
||||
rect.height = bottom - top;
|
||||
slotBind(
|
||||
renderOverlay(rect, slotContainer)
|
||||
);
|
||||
}
|
||||
function renderSlotOverlay(overlayStart, overlayEnd, col) {
|
||||
var dayStart = cellToDate(0, 0);
|
||||
var dayEnd = addDays(cloneDate(dayStart), 1);
|
||||
var stretchStart = new Date(Math.max(dayStart, overlayStart));
|
||||
var stretchEnd = new Date(Math.min(dayEnd, overlayEnd));
|
||||
if (stretchStart < stretchEnd) {
|
||||
var rect = coordinateGrid.rect(0, col, 0, col, slotContainer); // only use it for horizontal coords
|
||||
var top = timePosition(dayStart, stretchStart);
|
||||
var bottom = timePosition(dayStart, stretchEnd);
|
||||
rect.top = top;
|
||||
rect.height = bottom - top;
|
||||
slotBind(
|
||||
renderOverlay(rect, slotContainer)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5383,7 +5381,7 @@ function ResourceView(element, calendar, viewName) {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
renderSlotOverlay(startDate, endDate);
|
||||
renderSlotOverlay(startDate, endDate, col);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5452,7 +5450,7 @@ function ResourceView(element, calendar, viewName) {
|
||||
}else{
|
||||
var d1 = realCellToDate(cell);
|
||||
var d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes'));
|
||||
renderSlotOverlay(d1, d2);
|
||||
renderSlotOverlay(d1, d2, cell.col);
|
||||
}
|
||||
}
|
||||
}, ev);
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user