From 87113e7aab78a78b3e5708c7dca99de0024628e4 Mon Sep 17 00:00:00 2001 From: Erica Dong Date: Sat, 13 Jan 2024 16:03:54 -0500 Subject: [PATCH 1/2] Flow styling --- src/components/Dashboard/Dashboard.css | 16 ++++++++++++++++ src/components/Dashboard/Dashboard.js | 26 ++++++++++++++++++++++---- src/components/Dashboard/Flow.js | 4 ++-- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/components/Dashboard/Dashboard.css b/src/components/Dashboard/Dashboard.css index e442025..6ddeb3d 100644 --- a/src/components/Dashboard/Dashboard.css +++ b/src/components/Dashboard/Dashboard.css @@ -4,4 +4,20 @@ background-color: #FFAEBC; /* height: 100vh; */ +} + +.sideButt:hover { + background-color: white !important; + color: black !important; + border-color: black !important; +} + +.courseNode { + transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); +} + +.courseNode:hover { + cursor: pointer; + background-color: black; + color: white; } \ No newline at end of file diff --git a/src/components/Dashboard/Dashboard.js b/src/components/Dashboard/Dashboard.js index 733be8a..38b6480 100644 --- a/src/components/Dashboard/Dashboard.js +++ b/src/components/Dashboard/Dashboard.js @@ -4,7 +4,7 @@ import "./Dashboard.css"; import { Button, Form, Layout, Menu, theme } from "antd"; import { MenuFoldOutlined, MenuUnfoldOutlined, ApartmentOutlined, FileTextOutlined } from "@ant-design/icons"; -import ReactFlow from 'reactflow'; +import ReactFlow, { Background, MarkerType } from 'reactflow'; import Flow from './Flow.js'; import RequirementsSidebar from './Requirements/Requirements.js'; import Table from "../Table/Table.jsx" @@ -90,6 +90,12 @@ function Dashboard() { if (tempCourses[j].data.label.match(courseCodeRegex) == courseCodes[k]) { tempEdges.push({ id: 'e' + first.toString() + '-' + second.toString(), + type: 'smoothstep', + markerStart: { + type: MarkerType.ArrowClosed, + width: 20, + height: 20, + }, source: tempCourses[i].id, target: tempCourses[j].id }); @@ -204,7 +210,7 @@ function Dashboard() { if (tab == 1) { windowContent =