Ensure time slot and event grids have the same number of columns.
This commit is contained in:
parent
b2dabd1dc4
commit
41b640a1ea
1 changed files with 8 additions and 0 deletions
|
@ -53,6 +53,7 @@ class Calendar {
|
||||||
this.createEventContainer();
|
this.createEventContainer();
|
||||||
this.createEventDetailsContainer();
|
this.createEventDetailsContainer();
|
||||||
|
|
||||||
|
this.updateTimeSlotContainerGridStyle();
|
||||||
this.updateEventContainerGridStyle();
|
this.updateEventContainerGridStyle();
|
||||||
|
|
||||||
this.createTimeSlots();
|
this.createTimeSlots();
|
||||||
|
@ -153,9 +154,16 @@ class Calendar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateTimeSlotContainerGridStyle () {
|
||||||
|
this.timeSlotsContainerNode.css("grid-template-columns",
|
||||||
|
`repeat(${this.nbHoursToDisplay}, ${100 / this.nbHoursToDisplay }%)`);
|
||||||
|
}
|
||||||
|
|
||||||
updateTimeSlots () {
|
updateTimeSlots () {
|
||||||
this.timeSlotsContainerNode.empty();
|
this.timeSlotsContainerNode.empty();
|
||||||
|
|
||||||
this.createTimeSlots();
|
this.createTimeSlots();
|
||||||
|
this.updateTimeSlotContainerGridStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
getHourSlotWidth () {
|
getHourSlotWidth () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue