アイコン発動条件整理

This commit is contained in:
harukin-expo-dev-env 2024-10-23 07:37:20 +00:00
parent bd1ea0857c
commit 40b7437c87

View File

@ -17,31 +17,31 @@ export const findReversalPoints = (array, stopStationIDList) => {
});
return a;
});
if (index != -1) {
return index;
}
if (index != -1) return index;
}
// 駅間の場合
if (array.length == 2) {
const allThroughStation = stopStationIDList.map((d) => {
if(array[0] == "M12" && array[1] == "Y09" || array[0] == "Y09" && array[1] == "M12"){
if(d[0] == "M12"){
return true;
}
else return false;
}
if (d[0] < array[0] && d[0] > array[1]) {
return true;
} else if (d[0] < array[1] && d[0] > array[0]) {
return true;
}else if (d[0] < array[0] && d[0] == array[1]) {
return true;
} else if (d[0] == array[1] && d[0] > array[0]) {
return true;
}
if (
(array[0] == "M12" && array[1] == "Y09") ||
(array[0] == "Y09" && array[1] == "M12")
)
return d[0] == "M12" ? true : false;
return false;
let returndata = false;
d.forEach((x) => {
if (array[0] < x && x < array[1]) {
returndata = true;
} else if (array[0] < x && x == array[1]) {
returndata = true;
} else if (array[1] == x && x < array[0]) {
returndata = true;
} else if (array[1] < x && x < array[0]) {
returndata = true;
}
});
return returndata;
});
return allThroughStation;
}