Skip to content

Commit

Permalink
Update phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Jan 2, 2025
1 parent a10c574 commit 8cb0f4e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/css/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,6 @@
.phpdocumentor-tag-link {
margin-right: var(--spacing-sm);
}
.phpdocumentor-uml-diagram svg {
cursor: zoom-in;
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>BitPay PHP SDK</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<base href="./">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
Expand Down
17 changes: 17 additions & 0 deletions docs/js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,20 @@
observer.observe(el);
})
})();
function openSvg(svg) {
// convert to a valid XML source
const as_text = new XMLSerializer().serializeToString(svg);
// store in a Blob
const blob = new Blob([as_text], { type: "image/svg+xml" });
// create an URI pointing to that blob
const url = URL.createObjectURL(blob);
const win = open(url);
// so the Garbage Collector can collect the blob
win.onload = (evt) => URL.revokeObjectURL(url);
};


var svgs = document.querySelectorAll(".phpdocumentor-uml-diagram svg");
for( var i=0,il = svgs.length; i< il; i ++ ) {
svgs[i].onclick = (evt) => openSvg(evt.target);
}

0 comments on commit 8cb0f4e

Please sign in to comment.