アイコン発動条件整理
This commit is contained in:
parent
bd1ea0857c
commit
40b7437c87
@ -17,31 +17,31 @@ export const findReversalPoints = (array, stopStationIDList) => {
|
|||||||
});
|
});
|
||||||
return a;
|
return a;
|
||||||
});
|
});
|
||||||
if (index != -1) {
|
if (index != -1) return index;
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 駅間の場合
|
// 駅間の場合
|
||||||
if (array.length == 2) {
|
if (array.length == 2) {
|
||||||
|
|
||||||
const allThroughStation = stopStationIDList.map((d) => {
|
const allThroughStation = stopStationIDList.map((d) => {
|
||||||
if(array[0] == "M12" && array[1] == "Y09" || array[0] == "Y09" && array[1] == "M12"){
|
if (
|
||||||
if(d[0] == "M12"){
|
(array[0] == "M12" && array[1] == "Y09") ||
|
||||||
return true;
|
(array[0] == "Y09" && array[1] == "M12")
|
||||||
}
|
)
|
||||||
else return false;
|
return d[0] == "M12" ? true : 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
return allThroughStation;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user