宇多津関係の挙動を変更
This commit is contained in:
@@ -21,12 +21,17 @@ export const findReversalPoints = (array, stopStationIDList) => {
|
||||
}
|
||||
// 駅間の場合
|
||||
if (array.length == 2) {
|
||||
const allThroughStation = stopStationIDList.map((d) => {
|
||||
if (
|
||||
(array[0] == "M12" && array[1] == "Y09") ||
|
||||
(array[0] == "Y09" && array[1] == "M12")
|
||||
)
|
||||
const allThroughStation = stopStationIDList.map((d, index, arrays) => {
|
||||
if (array[0] == "Y09" && array[1] == "M12") {
|
||||
return d[0] == "M12" ? true : false;
|
||||
} else if (array[0] == "M12" && array[1] == "Y09") {
|
||||
if (index) {
|
||||
if (arrays[index - 1][0] == "M12") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
let returndata = false;
|
||||
d.forEach((x) => {
|
||||
|
@@ -120,10 +120,16 @@ export const CurrentTrainProvider: FC<props> = ({ children }) => {
|
||||
.replace("(上り)", "")
|
||||
.replace("(徳島線)", "")
|
||||
.replace("(高徳線)", "")
|
||||
.replace("(坂出方)", "")
|
||||
.replace("(児島方)", "")
|
||||
.split("~");
|
||||
const direction = currentTrainData?.Direction || 0;
|
||||
if (pos[0] == "児島" && pos[1] == "宇多津") {
|
||||
return ["M12", "Y09"];
|
||||
if (direction == 0) {
|
||||
return ["Y09", "M12"];
|
||||
} else {
|
||||
return ["M12", "Y09"];
|
||||
}
|
||||
} else if (pos[1] == "児島" && pos[0] == "宇多津") {
|
||||
return ["Y09", "M12"];
|
||||
} else if (pos[0] == "伊予若宮" && pos[1] == "伊予白滝") {
|
||||
|
Reference in New Issue
Block a user