From e3a65b9127132cb1119063f33179b3ab4d5bdfcd Mon Sep 17 00:00:00 2001 From: harukin-OneMix4 Date: Sat, 3 Feb 2024 02:30:36 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=B1=A4=E5=BB=BA=E3=81=A6=E5=88=97?= =?UTF-8?q?=E8=BB=8A=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ActionSheetComponents/EachTrainInfo.js | 69 +++++++++++++++---- 1 file changed, 54 insertions(+), 15 deletions(-) diff --git a/components/ActionSheetComponents/EachTrainInfo.js b/components/ActionSheetComponents/EachTrainInfo.js index 84320ca..999a1ed 100644 --- a/components/ActionSheetComponents/EachTrainInfo.js +++ b/components/ActionSheetComponents/EachTrainInfo.js @@ -51,6 +51,7 @@ export const EachTrainInfo = (props) => { const [isConcatNear, setIsConcatNear] = useState(false); const [tailStation, setTailStation] = useState(); const [headStation, setHeadStation] = useState(); + // const [actionSheetHorizonalScroll, setActionSheetHorizonalScroll] = useState(false); //裏列車探索 useEffect(() => { @@ -165,7 +166,12 @@ export const EachTrainInfo = (props) => { originalStationList, from: "AllTrainDiagramView", }; - //SheetManager.show("EachTrainInfo", { payload }); + SheetManager.hide("EachTrainInfo").then(() => { + //0.1秒待機してから開く + setTimeout(() => { + SheetManager.show("EachTrainInfo", { payload }); + }, 1); + }); }; useEffect(() => { setCurrentTrainData( @@ -380,7 +386,7 @@ export const EachTrainInfo = (props) => { const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef); return ( } ref={actionSheetRef} drawUnderStatusBar={false} @@ -448,6 +454,9 @@ export const EachTrainInfo = (props) => { {from == "AllTrainDiagramView" || ( setActionSheetHorizonalScroll(true)} + //onScrollEndDrag={() => setActionSheetHorizonalScroll(false)} + //onScrollBeginDrag={() => console.log("onScrollBeginDrag")} style={{ flexDirection: "row", //width: widthPercentageToDP("200%"), @@ -460,6 +469,8 @@ export const EachTrainInfo = (props) => { {/* { +const TrainDataView = ({ + currentTrainData, + currentPosition, + nearTrainIDList, + openTrainInfo, +}) => { return ( { } /> - - + + + + { + if (nearTrainIDList.length == 0) return; + openTrainInfo(nearTrainIDList[0]); + }} + > + {nearTrainIDList.length == 0 ? ( + + ) : ( + + )} + ); }; -const StateBox = ({ text, title }) => ( - - {title} +const StateBox = ({ text, title, style }) => ( + + {title} - + {text?.match("~") ? ( <> {text.split("~")[0]} @@ -917,7 +956,7 @@ const boxStyle = { margin: 10, }; const boxTextStyle = { - fontSize: 28, + fontSize: 25, color: "#0099CC", textAlign: "right", };