gateway: 입구의 지도를 iframe으로 변경

This commit is contained in:
2021-08-20 04:58:05 +09:00
parent 92458fb1b3
commit b0e7221950
6 changed files with 104 additions and 42 deletions
+30
View File
@@ -0,0 +1,30 @@
import $ from 'jquery';
import 'bootstrap';
import { reloadWorldMap } from './map';
declare global{
interface Window{
fitIframe:()=>void;
}
}
$(function($){
void reloadWorldMap({
targetJson: "j_map_recent.php",
reqType: 'get',
dynamicMapTheme: true,
callback: function(data, rawObject) {
const historyRaw = rawObject as unknown as {
history: string
};
$('.card-body').html(historyRaw.history);
if(window.parent !== window){
setTimeout(()=>{
window.parent.fitIframe();
}, 1);
}
}
});
});