From 68756dac948d9322da9f76d2535900bf6fcd1246 Mon Sep 17 00:00:00 2001 From: Garry Ing Date: Sun, 30 May 2021 15:17:00 -0400 Subject: [PATCH] updated previewer logic --- assets/js/scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/scripts.js b/assets/js/scripts.js index 188fbf3..b6aa856 100644 --- a/assets/js/scripts.js +++ b/assets/js/scripts.js @@ -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)