不要なコメントを削除し、列番データの処理を簡素化
This commit is contained in:
@@ -840,20 +840,7 @@ export const injectJavascriptData = ({
|
||||
return "https://storage.haruk.in/s1500.png";
|
||||
|
||||
default: //指定車両でなく、Regexでの指定に移動
|
||||
// // 琴平直通系普通電車
|
||||
// if(new RegExp(/^(1|4|5)2\\d\\dM$/).test(列番データ)){
|
||||
// setStationIcon(e.querySelector("img"),'https://storage.haruk.in/s7200.png',hasProblem);
|
||||
// break;
|
||||
// }
|
||||
// else if(new RegExp(/^(1|4|5)(1|5|6)\\d\\dM$/).test(列番データ)){
|
||||
// setStationIcon(e.querySelector("img"),'https://storage.haruk.in/s7000.png',hasProblem);
|
||||
// break;
|
||||
// }
|
||||
// else if(new RegExp(/^(1|5|6)\\d\\dM$/).test(列番データ)){
|
||||
// setStationIcon(e.querySelector("img"),'https://storage.haruk.in/s7000.png',hasProblem);
|
||||
// break;
|
||||
// }// 高徳線 普通列車系統
|
||||
// else
|
||||
// 高徳線 普通列車系統
|
||||
if (new RegExp(/^(4|5)3\\d\\dD$/).test(列番データ)) {
|
||||
return "https://storage.haruk.in/s1500.png";
|
||||
} else if (new RegExp(/^3\\d\\dD$/).test(列番データ)) {
|
||||
@@ -1517,7 +1504,6 @@ const setStrings = () =>{
|
||||
if(directions != null && directions != undefined){
|
||||
iconTrainDirection = directions ? true : false;
|
||||
}
|
||||
alert(directions+":"+列番データ+":"+(iconTrainDirection ? "right":"left"));
|
||||
if(iconTrainDirection){
|
||||
if(e.vehicle_img) trainIconUrl.push(e.vehicle_img);
|
||||
else if(e.vehicle_img_right) trainIconUrl.push(e.vehicle_img_right);
|
||||
@@ -1534,7 +1520,6 @@ const setStrings = () =>{
|
||||
if (trainIds.includes(列番データ.toString())) {
|
||||
let iconTrainDirection = parseInt(列番データ.toString().replace(/[^\\d]/g,""))%2 === 0 ? true : false;
|
||||
const {directions} = trainDataList.find(e => e.train_id === 列番データ);
|
||||
//alert(directions+":"+列番データ+":"+iconTrainDirection);
|
||||
if(directions != null && directions != undefined){
|
||||
iconTrainDirection = directions ? true : false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user