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", };