小修整
This commit is contained in:
@@ -127,17 +127,14 @@ export const StationDiagramView: FC<props> = ({ 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<props> = ({ route }) => {
|
||||
当駅止
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<View style={{ height: "auto", borderLeftWidth: 1, margin: 5, borderColor: "white" }} />
|
||||
<View
|
||||
style={{
|
||||
height: "auto",
|
||||
borderLeftWidth: 1,
|
||||
margin: 5,
|
||||
borderColor: "white",
|
||||
}}
|
||||
/>
|
||||
{showTypeFiltering ? (
|
||||
<>
|
||||
<TypeSelectorBox
|
||||
@@ -342,9 +346,9 @@ export const StationDiagramView: FC<props> = ({ 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 (
|
||||
<TouchableOpacity
|
||||
style={{
|
||||
alignItems: "center",
|
||||
marginHorizontal: 5,
|
||||
opacity: selectedTypeList.findIndex((item) => 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<{
|
||||
>
|
||||
<Text
|
||||
style={{
|
||||
color:
|
||||
selectedTypeList.findIndex((item) => item === typeID) !== -1
|
||||
? color
|
||||
: "white",
|
||||
color: isSelected ? color : "white",
|
||||
fontSize: 14,
|
||||
margin: 5,
|
||||
}}
|
||||
|
Reference in New Issue
Block a user