diff --git a/src/components/Example.svelte b/src/components/Example.svelte index ab4f2d54..e4bc11aa 100644 --- a/src/components/Example.svelte +++ b/src/components/Example.svelte @@ -21,7 +21,7 @@ bg: string ) { const numInUse = countNumberOfExamplesInUse(example); - let svg = example.replace("SaLmOn", bg); + let svg = example.replace("rebekkablue", bg); // .replace("]*\sheight="([^"]*)"/)) { svg = svg.replace(" { x.removeEventListener("click", onClick); + // remove select-none class + const newClass = x.getAttribute("class").replace("select-none", ""); + x.setAttribute("class", newClass); }); } function toggle() { @@ -35,6 +39,8 @@ document.querySelectorAll(query).forEach((x) => { x.addEventListener("click", onClick); + const newClass = x.getAttribute("class") + " select-none"; + x.setAttribute("class", newClass); }); } $: topString = boundingBox @@ -49,9 +55,10 @@ } } $: { - if (allowDrag && $configStore.tooltipXY) { - topString = $configStore.tooltipXY[1]; - leftString = $configStore.tooltipXY[0]; + if (tooltipOpen && allowDrag && $configStore.tooltipXY?.length) { + const [x, y] = $configStore.tooltipXY; + topString = y; + leftString = x; } } diff --git a/src/lib/charts.ts b/src/lib/charts.ts index f2706a43..f60848b0 100644 --- a/src/lib/charts.ts +++ b/src/lib/charts.ts @@ -35,7 +35,7 @@ export function buildTheme(pal: Palette): any { const basicColor = pal.background.luminance() > 0.5 ? "#000000" : "#ffffff"; // const secondLevelElementColor = "#605E5C"; // const backgroundColor = pal.background.toHex(); - const backgroundColor = "SaLmOn"; + const backgroundColor = "rebekkablue"; // const backgroundSecondaryColor = "#C8C6C4"; return {