駅名標のスタイル変更
This commit is contained in:
parent
f72ac1d97b
commit
60d8caaefa
@ -6,6 +6,8 @@ import { useInterval } from "../../lib/useInterval";
|
||||
import { AS } from "../../storageControl";
|
||||
import { useFavoriteStation } from "../../stateBox/useFavoriteStation";
|
||||
|
||||
import lineColorList from "../../assets/originData/lineColorList";
|
||||
|
||||
export default function Sign(props) {
|
||||
const { currentStation, originalStationList, oP, oLP } = props;
|
||||
const { favoriteStation, setFavoriteStation } = useFavoriteStation();
|
||||
@ -24,7 +26,7 @@ export default function Sign(props) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
setTestButtonStatus(isFavorite.length != 0);
|
||||
setTestButtonStatus(isFavorite.length == 0 ? false : true);
|
||||
}, [favoriteStation, currentStation]);
|
||||
|
||||
useInterval(() => {
|
||||
@ -220,27 +222,40 @@ const StationNumberMaker = (props) => {
|
||||
};
|
||||
return props.currentStation
|
||||
.filter((d) => (d.StationNumber ? true : false))
|
||||
.map((d, index, array) => (
|
||||
<View
|
||||
style={{
|
||||
position: "absolute",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
top: getTop(array, index) + "%",
|
||||
right: "10%",
|
||||
width: wp("10%"),
|
||||
height: wp("10%"),
|
||||
borderColor: "#2E94BB",
|
||||
borderWidth: parseInt("2%"),
|
||||
borderRadius: parseInt("100%"),
|
||||
}}
|
||||
key={array[index].StationNumber}
|
||||
>
|
||||
<View style={{ flex: 1 }} />
|
||||
<Text style={{ fontSize: parseInt("20%") }}>{d.StationNumber}</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
</View>
|
||||
));
|
||||
.map((d, index, array) => {
|
||||
const lineID = d.StationNumber.slice(0, 1);
|
||||
const lineName = d.StationNumber.slice(1);
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
position: "absolute",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
top: getTop(array, index) + "%",
|
||||
right: "10%",
|
||||
width: wp("10%"),
|
||||
height: wp("10%"),
|
||||
borderColor: lineColorList[lineID],
|
||||
borderWidth: parseInt("3%"),
|
||||
borderRadius: parseInt("100%"),
|
||||
}}
|
||||
key={array[index].StationNumber}
|
||||
>
|
||||
<View style={{ flex: 1 }} />
|
||||
<Text
|
||||
style={{
|
||||
fontSize: parseInt("15%"),
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
{lineID + "\n" + lineName}
|
||||
</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
</View>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const StationNameArea = (props) => {
|
||||
|
Loading…
Reference in New Issue
Block a user