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.createEventDetailsContainer();
|
||||
|
||||
this.updateTimeSlotContainerGridStyle();
|
||||
this.updateEventContainerGridStyle();
|
||||
|
||||
this.createTimeSlots();
|
||||
|
@ -153,9 +154,16 @@ class Calendar {
|
|||
}
|
||||
}
|
||||
|
||||
updateTimeSlotContainerGridStyle () {
|
||||
this.timeSlotsContainerNode.css("grid-template-columns",
|
||||
`repeat(${this.nbHoursToDisplay}, ${100 / this.nbHoursToDisplay }%)`);
|
||||
}
|
||||
|
||||
updateTimeSlots () {
|
||||
this.timeSlotsContainerNode.empty();
|
||||
|
||||
this.createTimeSlots();
|
||||
this.updateTimeSlotContainerGridStyle();
|
||||
}
|
||||
|
||||
getHourSlotWidth () {
|
||||
|
|
Loading…
Reference in a new issue