Skip to content
Snippets Groups Projects
Commit e1179a97 authored by Niklas Schrötler's avatar Niklas Schrötler
Browse files

PlanElement: Now animating up instead of right

parent b82a5e28
No related branches found
No related tags found
No related merge requests found
...@@ -43,16 +43,17 @@ const PlanElement = (props: { ...@@ -43,16 +43,17 @@ const PlanElement = (props: {
<motion.div <motion.div
className={"overflow-hidden"} className={"overflow-hidden"}
initial={{ initial={{
opacity: 0, opacity: 1,
translateX: "-100%" translateY: "0%",
marginTop: "0rem"
}} }}
animate={shown ? { animate={shown ? {
opacity: 1, opacity: 1,
translateX: "0%", translateY: "0%",
marginTop: "0rem" marginTop: "0rem"
} : { } : {
opacity: 0, opacity: 0,
translateX: "100%", translateY: "-100%",
height: 0, height: 0,
marginTop: "-0.75rem" marginTop: "-0.75rem"
}} }}
...@@ -114,10 +115,14 @@ const trainIdentifierToColor = (identifier: string): string => { ...@@ -114,10 +115,14 @@ const trainIdentifierToColor = (identifier: string): string => {
const deDortmund = (input: string): string => { const deDortmund = (input: string): string => {
// Don't remove the city from central station location // Don't remove the city from central station location
if (input.toLowerCase().includes("HBf")) { if (input.includes("Hbf")) {
return input; return input;
} }
// In all other cases, remove dortmund
return input.replaceAll("Dortmund ", ""); return input
// In all other cases, remove dortmund
.replaceAll("Dortmund/Joseph Fraunhofer", "Joseph-von-Fraunhofer")
// Special case: Because the API is dumb, translate JvF to be consistent
.replaceAll("Dortmund ", "");
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment