"틀:SemanticGraph"의 두 판 사이의 차이

광주문화예술인문스토리플랫폼
이동: 둘러보기, 검색
1번째 줄: 1번째 줄:
 
<onlyinclude>
 
<onlyinclude>
 +
{{#if:{{{key|}}}|
 +
<h2><span class="mw-headline" id="의미관계망">의미관계망</span></h2>
 
{{#tag:html|
 
{{#tag:html|
<div class="semantic-graph-wrapper">
+
<p>
<h2 id="graph-heading" style="display:none;"><span class="mw-headline">의미관계망</span></h2>
+
<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>
<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/>
 
<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}}}'">  
+
<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>
 
</p>
</div>
+
}}
<script>
+
|<!-- key가 없으면 아무것도 표시 안 함 -->
(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>
 
</onlyinclude>

2026년 1월 12일 (월) 09:39 판



사용방법

시맨틱 데이터베이스의 특정 노드를 중심으로 하는 네트워크 그래프를 출력하는 틀입니다

{{SemanticGraph | key = }}