From 85fd66b72858db3f1a9b682b347111eff58e4bdd Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Tue, 16 Sep 2025 11:29:05 +0000 Subject: [PATCH] =?UTF-8?q?fixedTrainBox=E3=81=AE=E3=83=AC=E3=82=A4?= =?UTF-8?q?=E3=82=A2=E3=82=A6=E3=83=88=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Apps/FixedPositionBox/FixedTrainBox.tsx | 133 +++++++++++------- 1 file changed, 84 insertions(+), 49 deletions(-) diff --git a/components/Apps/FixedPositionBox/FixedTrainBox.tsx b/components/Apps/FixedPositionBox/FixedTrainBox.tsx index 191184a..0655711 100644 --- a/components/Apps/FixedPositionBox/FixedTrainBox.tsx +++ b/components/Apps/FixedPositionBox/FixedTrainBox.tsx @@ -19,6 +19,7 @@ import { findReversalPoints } from "@/lib/eachTrainInfoCoreLib/findReversalPoint import { CustomTrainData, trainTypeID } from "@/lib/CommonTypes"; import { getCurrentTrainData } from "@/lib/getCurrentTrainData"; import { Ionicons } from "@expo/vector-icons"; +import dayjs from "dayjs"; type props = { trainID: string; @@ -239,7 +240,9 @@ export const FixedTrain: FC = ({ overflow: "hidden", }} > - + = ({ > = ({ marginTop: customTrainType.fontAvailable ? 3 : 0, color: "white", textAlignVertical: "center", - textAlign: "center", + textAlign: "left", }} > {customTrainType.shortName} @@ -334,7 +337,7 @@ export const FixedTrain: FC = ({ /> = ({ alignItems: "center", }} onPress={() => { - LayoutAnimation.configureNext(LayoutAnimation.Presets.linear); + LayoutAnimation.configureNext({ + duration: 500, + update: { type: "spring", springDamping: 0.7 }, + }); if (displaySize === 50) { setDisplaySize(200); } else { @@ -556,6 +562,7 @@ const CurrentPositionBox = ({ firstText = Pos; } } + const delayTime = train?.delay == "入線" ? 0 : parseInt(train?.delay); return ( - {(index == 0 && secondText == "") || ( - + {station.split("").map((i, index) => { + return ( + + {i} + + ); + })} + + {isSmall || + (time != "" && ( + + {distanceMinute} + + ))} + - {station.split("").map((i, index) => { - return ( - - {i} - - ); - })} - - - {se.includes("通") ? "" : "●"} - - - )} + {se.includes("通") + ? null + : index == 1 && secondText == "" + ? "→" + : "●"} + + {index == 0 && secondText != "" && ( - - > - + )}