Files
core/hwe/ts/defaultSelectCityByMap.ts
T
Hide_D 3bd09a1aa4 core: getJSFiles -> getJSPlugins
- 각각 js를 불러오기보다.. 초기화 함수를 직접 호출
- lazy loading은 어차피 나중에 새로 만들거니까 안 함.
2021-08-30 01:14:20 +09:00

23 lines
712 B
TypeScript

import { reloadWorldMap } from "./map";
import { unwrap_any } from "./util/unwrap_any";
export function defaultSelectCityByMap(): void {
const $target = $("#destCityID");
console.log('city', $target);
void reloadWorldMap({
isDetailMap: false,
clickableAll: true,
neutralView: true,
useCachedMap: true,
selectCallback: function (city) {
const currVal = unwrap_any<string>($target.val());
$target.val(city.id);
$target.trigger("change");
if ($target.val() === null) {
$target.val(currVal).trigger("change").blur();
}
return false;
}
});
}