From 9de17ee0d6ea3077413951487eba67f3615dfac2 Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Thu, 18 Jan 2024 18:29:58 -0800 Subject: [PATCH] data fetch bug hunting --- README.md | 2 +- src/lib/charts.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 23f93b77..7583906a 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ To raise the sliders, you need to click on one of the examples that are displaye - [ ] Minor: Make keyboard short cut (option+up/down) for the z-direction - [ ] Chore: Extract some common types into a top level location (like types.ts type thing) - [x] Chore: Rearrange some of the colors in the color area eg make rg on xy and b on z etc, blocking polar stuff -- x] Polar stuff +- [x] Polar stuff - [ ] Insert color theory options, eg insert opposing, inserting analogous color, etc, mine from the adobe picker - [ ] Labels, tooltips, etc - [ ] Nice to have: Rest of basic geometry manipulations: flip (horizontal, vertical), scale, Distribute radially diff --git a/src/lib/charts.ts b/src/lib/charts.ts index 48bd4899..628d1321 100644 --- a/src/lib/charts.ts +++ b/src/lib/charts.ts @@ -204,10 +204,14 @@ export async function getSVG(localSpec: string, pal: Palette) { // ? "https://vega.github.io/editor/data/penguins.json" // : "data/penguins.json", const matchedDataset = vegaDatasets.find((x) => spec.data?.url?.includes(x)); + console.log("asd", matchedDataset); if (matchedDataset) { + console.log("XXXX", matchedDataset); if (location.href.includes("localhost")) { + console.log("a"); spec.data.url = `data/${matchedDataset}`; } else { + console.log("b"); spec.data.url = `https://vega.github.io/editor/data/${matchedDataset}`; } }