Skip to content

Commit

Permalink
Fix calendar resize event bug
Browse files Browse the repository at this point in the history
  • Loading branch information
smartspot2 committed Aug 29, 2022
1 parent ddc9ce6 commit 594a8c4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export function Calendar({
setIntervalWidth(rect.width * WIDTH_SCALE);

const resizeHandler = () => {
const interval = document.getElementsByClassName("calendar-day-interval").item(0);
const rect = interval!.getBoundingClientRect();
setIntervalHeight(rect.height);
setIntervalWidth(rect.width * WIDTH_SCALE);
Expand Down
2 changes: 1 addition & 1 deletion csm_web/frontend/static/frontend/css/calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Hierarchy:
flex-direction: column;
justify-content: stretch;
align-items: center;
padding-top: 8px;
padding: 8px 0;
}

.calendar-day-interval {
Expand Down
2 changes: 0 additions & 2 deletions csm_web/scheduler/utils/match_solver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import networkx as nx
from pprint import pprint
from collections import namedtuple
import itertools

Expand Down Expand Up @@ -88,7 +87,6 @@ def get_matches(mentors, slots, preferences):
flow_cost, flow_dict = nx.network_simplex(G)
mentors_set = set(itertools.chain(*mentors))
assignments = {}
pprint(flow_dict)
for u in flow_dict:
for v in flow_dict[u]:
if (
Expand Down

0 comments on commit 594a8c4

Please sign in to comment.