mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
73 lines
2.5 KiB
HTML
73 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>IntelliJ Platform Activity Diagrams</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css" integrity="sha256-rTpdO0HXBCNpreAHcu6tB2Ppg515Vo+5GtYSsnNLz+8=" crossorigin="anonymous">
|
|
<script src="https://cdn.jsdelivr.net/npm/@panzoom/panzoom@4.5.1/dist/panzoom.min.js" integrity="sha256-9PI4Hcqdhk6UDuIArOUvzRL9S/uJRmDpkA2o4gIigDs=" crossorigin="anonymous"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
let panzoom = null
|
|
|
|
function applyItem(item) {
|
|
document.getElementById("diagramSelector").value = item.value
|
|
|
|
fetch(`./${item.value}.svg`)
|
|
.then(response => response.text())
|
|
.then(svgContent => {
|
|
const title = `${item.label} — IntelliJ Platform Activity Diagrams`
|
|
document.title = title
|
|
const id = item.value
|
|
history.pushState(null, title, `#${id}`)
|
|
localStorage.setItem("selectedDiagram", id)
|
|
|
|
if (panzoom != null) {
|
|
panzoom.destroy()
|
|
}
|
|
|
|
const parent = document.getElementById("svgContainer")
|
|
while (parent.firstChild != null) {
|
|
parent.removeChild(parent.lastChild)
|
|
}
|
|
parent.insertAdjacentHTML("afterbegin", svgContent)
|
|
|
|
panzoom = Panzoom(parent)
|
|
})
|
|
}
|
|
|
|
function diagramChanged(event) {
|
|
applyItem(event.target.options[event.target.selectedIndex])
|
|
}
|
|
</script>
|
|
<section class="section">
|
|
<div id="diagramSelectorDiv" class="select is-pulled-right panzoom-exclude" style="z-index: 100;">
|
|
<select id="diagramSelector" onchange="diagramChanged(event)">
|
|
<option value="getting-service">Getting Service</option>
|
|
<option value="projectClose-dispose-flow">Close Project Flow</option>
|
|
<option value="icon-loading-stat">Icon Loading Stats</option>
|
|
<option value="plugin-model">Plugin Model V2</option>
|
|
<option value="jar-format">Optimized ZIP</option>
|
|
</select>
|
|
</div>
|
|
<!--suppress CheckTagEmptyBody -->
|
|
<div id="svgContainer" style="width: 100%; height: 100%;">
|
|
</div>
|
|
</section>
|
|
|
|
<script>
|
|
(function () {
|
|
const urlPath = window.location.hash
|
|
const selectedId = urlPath != null && urlPath.length > 1 ? urlPath.substring(1) : localStorage.getItem("selectedDiagram")
|
|
if (selectedId == null) {
|
|
applyItem(document.getElementById("diagramSelector").options[0])
|
|
}
|
|
else {
|
|
applyItem(Array.from(document.getElementById("diagramSelector").options).find(it => it.value === selectedId))
|
|
}
|
|
})()
|
|
</script>
|
|
</body>
|
|
</html>
|