js2ts: processing parts(WIP)

This commit is contained in:
Hide_D committed 2021-08-20 03:24:03 +09:00
1 parent d7851e5ec9
commit 80541abe9f
6 files changed
+184 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { reloadWorldMap } from "./map";
import { unwrap_any } from "./util/unwrap_any";
/*import $ from 'jquery';
import 'select2';*///TODO: processing
$(function() {
const $target = $("#destNationID");
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;
}
});
});