updated previewer logic

This commit is contained in:
Garry Ing 2021-05-30 15:17:00 -04:00
parent b2ff6cb431
commit 68756dac94
No known key found for this signature in database
GPG Key ID: 3B379B1F2193CC3E

View File

@ -53,7 +53,7 @@ const showTooltip = (event) => {
const elemProps = elem.getClientRects()[elem.getClientRects().length - 1]
const top = window.pageYOffset || document.documentElement.scrollTop
if (event.target.host === window.location.host) {
if (event.target.host === window.location.host && event.target.getAttribute('href').charAt(0) !== '#') {
window.fetch(event.target.href)
.then(response => response.text())
.then(data => {
@ -331,6 +331,7 @@ if (typeof window.graphData !== 'undefined') {
.merge(text)
node.attr('active', (d) => isCurrentPath(d.path) ? true : null)
node.attr('long-form', (d) => d.type === 'long-form' ? true : null)
text.attr('active', (d) => isCurrentPath(d.path) ? true : null)
simulation.nodes(nodesData)