Files
openide/docs/out/index.html
Vladimir Krivosheev c2b2520994 new plugin descriptor format - full support on all levels
GitOrigin-RevId: 718c9401f22900c30029ec62c23f60f6f22278ee
2021-05-27 20:17:14 +00:00

82 lines
2.8 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.2/css/bulma.min.css" integrity="sha256-O8SsQwDg1R10WnKJNyYgd9J3rlom+YSVcGbEF5RmfFk=" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/@panzoom/panzoom@4.4.0/dist/panzoom.min.js" integrity="sha256-+djd9iOn6UHGwEA/IKKJL4nUsY9LaSoc8YYtbFhZSPw=" 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.firstChild, {
disableZoom: true,
handleStartEvent: (event) => {
event.stopPropagation()
// otherwise text is not selectable (at least, works in Safari, doesn't work in Chrome in any case)
// event.preventDefault()
},
})
})
}
function diagramChanged(event) {
applyItem(event.target.options[event.target.selectedIndex])
}
</script>
<section class="section">
<div class="select is-pulled-right panzoom-exclude">
<label>
<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="plugin-graph">Plugin graph (ultimate)</option>
</select>
</label>
</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>