Skip to content

Commit

Permalink
Fix certain hour range causing visual glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
LioQing committed May 19, 2023
1 parent 3832be1 commit 4b55ba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/TimeSlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const TimeSlot = ({ day, timeIndex, data, y, x }: Props) => {
&& !currData.overlapped
&& !currData.hovered
)
&& y > 0
&& y > timetable.hour[0]
&& data[y - 1][x].selected === currData.selected
&& compareMaps(data[y - 1][x].overlapped, currData.overlapped)
&& data[y - 1][x].hovered === currData.hovered
Expand All @@ -78,7 +78,7 @@ const TimeSlot = ({ day, timeIndex, data, y, x }: Props) => {
if (!currData.overlapped && !currData.selected && !currData.hovered) return 1;

var rowSpan = 0;
for (var i = y; i < data.length; i++) {
for (var i = y; i <= timetable.hour[1]; i++) {
if (
data[i][x].selected !== currData.selected
|| !compareMaps(data[i][x].overlapped, currData.overlapped)
Expand Down

0 comments on commit 4b55ba6

Please sign in to comment.