Skip to content

Commit

Permalink
fix: loc list
Browse files Browse the repository at this point in the history
  • Loading branch information
whes1015 committed Sep 6, 2023
1 parent db994f9 commit 7b8262f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/index/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,12 @@ function on_eew(data, type) {
.bindTooltip("", { opacity: 1, permanent: true, direction: "right", offset: [10, 0], className: "progress-tooltip" })
.addTo(TREM.Maps.main);
}
const _loc_list = eew_location_intensity(data, data.depth);
const _loc_list = TREM.EQ_list[data.id].loc;
let loc_list = "";
for (let i = 0; i < Object.keys(_loc_list).length; i++) {
const loc = Object.keys(_loc_list)[i];
if ((2 * Math.log10(_loc_list[loc].pga) + 0.7) >= 4) {
if (loc == "max_pga") continue;
if (intensity_float_to_int(2 * Math.log10(_loc_list[loc].pga) + 0.7) >= 4) {
const city = loc.split(" ")[0];
if (!loc_list.includes(city)) loc_list += `${city},`;
}
Expand Down

0 comments on commit 7b8262f

Please sign in to comment.