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: {
<motion.div
className={"overflow-hidden"}
initial={{
opacity: 0,
translateX: "-100%"
opacity: 1,
translateY: "0%",
marginTop: "0rem"
}}
animate={shown ? {
opacity: 1,
translateX: "0%",
translateY: "0%",
marginTop: "0rem"
} : {
opacity: 0,
translateX: "100%",
translateY: "-100%",
height: 0,
marginTop: "-0.75rem"
}}
......@@ -114,10 +115,14 @@ const trainIdentifierToColor = (identifier: string): string => {
const deDortmund = (input: string): string => {
// Don't remove the city from central station location
if (input.toLowerCase().includes("HBf")) {
if (input.includes("Hbf")) {
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