Skip to content

Commit 5aa46d2

Browse files
committed
Use phpDocumentor 3.7.1 templates
1 parent 72457fd commit 5aa46d2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/api/php_api/php_api_reference/css/template.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,3 +909,6 @@ div.path {
909909
.path p.description {
910910
color: var(--ibexa-dusk-black);
911911
}
912+
.phpdocumentor-uml-diagram svg {
913+
cursor: zoom-in;
914+
}

docs/api/php_api/php_api_reference/js/template.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@
1515
observer.observe(el);
1616
})
1717
})();
18+
function openSvg(svg) {
19+
// convert to a valid XML source
20+
const as_text = new XMLSerializer().serializeToString(svg);
21+
// store in a Blob
22+
const blob = new Blob([as_text], { type: "image/svg+xml" });
23+
// create an URI pointing to that blob
24+
const url = URL.createObjectURL(blob);
25+
const win = open(url);
26+
// so the Garbage Collector can collect the blob
27+
win.onload = (evt) => URL.revokeObjectURL(url);
28+
};
29+
30+
31+
var svgs = document.querySelectorAll(".phpdocumentor-uml-diagram svg");
32+
for( var i=0,il = svgs.length; i< il; i ++ ) {
33+
svgs[i].onclick = (evt) => openSvg(evt.target);
34+
}

0 commit comments

Comments
 (0)