Skip to content

Commit

Permalink
data fetch bug hunting
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Jan 19, 2024
1 parent 5680be1 commit 9de17ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/lib/charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
}
Expand Down

0 comments on commit 9de17ee

Please sign in to comment.