diff --git a/components/StationDiagram/StationDiagramView.tsx b/components/StationDiagram/StationDiagramView.tsx index 6b5d95c..3ce86ca 100644 --- a/components/StationDiagram/StationDiagramView.tsx +++ b/components/StationDiagram/StationDiagramView.tsx @@ -127,17 +127,14 @@ export const StationDiagramView: FC = ({ route }) => { (item) => item === "Forwarding" ) !== -1 ) { - console.log("回送"); - console.log(d); - console.log(!d.match(/[A,B,R,H,E,T,L]/)); if (!d.match(/[A,B,R,H,E,T,L]/)) return; - } - else if ( + } else if ( selectedTypeList.findIndex((item) => item === "SPCL") !== -1 ) { if (!d.match(/9\d\d\d[D,M,S]/)) return; + } else { + return; } - else{ return; } } returnDataArray.push(arrayData); }); @@ -252,7 +249,14 @@ export const StationDiagramView: FC = ({ route }) => { 当駅止 - + {showTypeFiltering ? ( <> = ({ route }) => { borderRadius: 100, }} onPress={() => { - LayoutAnimation.configureNext( - LayoutAnimation.Presets.easeInEaseOut - ); + LayoutAnimation.configureNext( + LayoutAnimation.Presets.easeInEaseOut + ); setShowTypeFiltering(true); }} > @@ -404,18 +408,17 @@ export const TypeSelectorBox: FC<{ typeName, typeID, relativeID, - color + color, } = props; + const isSelected = + selectedTypeList.findIndex((item) => item === typeID) !== -1; return ( item === typeID) !== -1 ? 1 : 0.8, - backgroundColor: - selectedTypeList.findIndex((item) => item === typeID) !== -1 - ? "white" - : color, + opacity: isSelected ? 1 : 0.8, + backgroundColor: isSelected ? "white" : color, alignSelf: "center", borderColor: color, borderWidth: 1, @@ -439,10 +442,7 @@ export const TypeSelectorBox: FC<{ > item === typeID) !== -1 - ? color - : "white", + color: isSelected ? color : "white", fontSize: 14, margin: 5, }}