暴走するバグを修正
This commit is contained in:
parent
892d567991
commit
f9e3b1d658
@ -34,11 +34,6 @@ export default function TrainMenu({ style }) {
|
||||
""
|
||||
).split(",");
|
||||
if (latlng.length == 0) return null;
|
||||
if (index == 0 && stationPin.length > 0) {
|
||||
webview.current
|
||||
?.injectJavaScript(`MoveDisplayStation('${d}_${D.MyStation}_${D.Station_JP}');
|
||||
document.getElementById("disp").insertAdjacentHTML("afterbegin", "<div />");`);
|
||||
}
|
||||
stationPinData.push({ D, d, latlng, indexBase: 0, index });
|
||||
});
|
||||
});
|
||||
@ -150,7 +145,26 @@ export default function TrainMenu({ style }) {
|
||||
opacity: selectedLine == d ? 1 : !selectedLine ? 1 : 0.5,
|
||||
zIndex: 10,
|
||||
}}
|
||||
onPress={() => setSelectedLine(selectedLine == d ? undefined : d)}
|
||||
onPress={() => {
|
||||
const s = selectedLine == d ? undefined : d;
|
||||
setSelectedLine(s);
|
||||
Object.keys(stationData).forEach((data, indexBase) => {
|
||||
stationData[data].forEach((D, index) => {
|
||||
if (!D.StationMap) return null;
|
||||
if (s && s != data) return;
|
||||
const latlng = D.StationMap.replace(
|
||||
"https://www.google.co.jp/maps/place/",
|
||||
""
|
||||
).split(",");
|
||||
if (latlng.length == 0) return null;
|
||||
if (index == 0 && stationPin.length > 0) {
|
||||
webview.current
|
||||
?.injectJavaScript(`MoveDisplayStation('${data}_${D.MyStation}_${D.Station_JP}');
|
||||
document.getElementById("disp").insertAdjacentHTML("afterbegin", "<div />");`);
|
||||
}
|
||||
});
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{ color: "white", fontWeight: "bold", fontSize: 20 }}
|
||||
|
Loading…
Reference in New Issue
Block a user