From 44be8dd32732b1025594f5ee107b17dc545fac47 Mon Sep 17 00:00:00 2001 From: Garry Ing Date: Mon, 15 Mar 2021 20:06:04 -0400 Subject: [PATCH] move to window obj --- _includes/notes_graph.html | 2 +- assets/js/scripts.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/_includes/notes_graph.html b/_includes/notes_graph.html index 2408ec9..45cff54 100644 --- a/_includes/notes_graph.html +++ b/_includes/notes_graph.html @@ -4,6 +4,6 @@
\ No newline at end of file diff --git a/assets/js/scripts.js b/assets/js/scripts.js index cb9682d..9b12788 100644 --- a/assets/js/scripts.js +++ b/assets/js/scripts.js @@ -82,7 +82,7 @@ document.querySelectorAll('#notes-entry-container a').forEach(setupListeners) const d3 = window.d3 -if (typeof graphData !== 'undefined') { +if (typeof window.graphData !== 'undefined') { const MINIMAL_NODE_SIZE = 10 const MAX_NODE_SIZE = 12 const ACTIVE_RADIUS_FACTOR = 1.5 @@ -92,10 +92,8 @@ if (typeof graphData !== 'undefined') { const FONT_BASELINE = 40 const MAX_LABEL_LENGTH = 50 - /* global graphData */ - - const nodesData = graphData.nodes - const linksData = graphData.edges + const nodesData = window.graphData.nodes + const linksData = window.graphData.edges const nodeSize = {}