"틀:SemanticGraph"의 두 판 사이의 차이
광주문화예술인문스토리플랫폼
| 1번째 줄: | 1번째 줄: | ||
| − | + | <onlyinclude> | |
| − | ( | + | {{#tag:html| |
| − | ( | + | <div class="semantic-graph-wrapper"> |
| − | + | <h2 id="graph-heading" style="display:none;"><span class="mw-headline">의미관계망</span></h2> | |
| − | + | <p id="graph-content" style="display:none;"> | |
| − | + | <iframe id="semantic-graph-iframe" width="100%" height="640px" style="border:0" src="https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key{{!}}|}}}"></iframe> | |
| − | + | <br/> | |
| − | + | <input type="button" value="전체화면" onclick="location.href='https://app.vaquitalab.com/aistory/story01?server=tcp:encyves.aks.ac.kr&db=gwangju2025&project=gwangju&key={{{key}}}'"> | |
| − | + | </p> | |
| − | + | </div> | |
| + | <script> | ||
| + | (function() { | ||
| + | var iframe = document.getElementById('semantic-graph-iframe'); | ||
| + | var heading = document.getElementById('graph-heading'); | ||
| + | var content = document.getElementById('graph-content'); | ||
| + | var shown = false; | ||
| + | |||
| + | function showGraph() { | ||
| + | if (!shown) { | ||
| + | heading.style.display = ''; | ||
| + | content.style.display = ''; | ||
| + | shown = true; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | // iframe 로드 완료 후 2초 뒤에 표시 (데이터가 있다고 가정) | ||
| + | iframe.addEventListener('load', function() { | ||
| + | setTimeout(function() { | ||
| + | try { | ||
| + | var iframeWin = iframe.contentWindow; | ||
| + | var iframeDoc = iframe.contentDocument {{!}}{{!}} iframeWin.document; | ||
| + | |||
| + | // 내부 접근 가능하면 canvas/svg 체크 | ||
| + | if (iframeDoc.querySelector('canvas') {{!}}{{!}} | ||
| + | iframeDoc.querySelector('svg') {{!}}{{!}} | ||
| + | iframeDoc.querySelector('.vis-network')) { | ||
| + | showGraph(); | ||
| + | } | ||
| + | } catch(e) { | ||
| + | // Cross-origin이면 일단 표시 (정상 데이터로 간주) | ||
| + | showGraph(); | ||
| + | } | ||
| + | }, 2000); | ||
| + | }); | ||
| + | })(); | ||
| + | </script> | ||
| + | }} | ||
| + | </onlyinclude> | ||
2026년 1월 12일 (월) 09:39 판
의미관계망
사용방법
시맨틱 데이터베이스의 특정 노드를 중심으로 하는 네트워크 그래프를 출력하는 틀입니다
{{SemanticGraph | key = }}