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

24 lines
763 B
TypeScript

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