diff --git a/src/components/PalPreview.svelte b/src/components/PalPreview.svelte index 37348e6d..d829ce25 100644 --- a/src/components/PalPreview.svelte +++ b/src/components/PalPreview.svelte @@ -9,7 +9,6 @@ import { dealWithFocusEvent } from "../lib/utils"; $: focusSet = new Set($focusStore.focusedColors); - console.log("todo tag presentation", pal); @@ -30,7 +29,7 @@ class={"w-6 h-6 mx-2 rounded-full transition-all"} class:w-8={highlightSelected && focusSet.has(idx)} class:h-8={highlightSelected && focusSet.has(idx)} - class:mb-5={highlightSelected && !focusSet.has(idx)} + class:mb-3={highlightSelected && !focusSet.has(idx)} style="background-color: {color.color.toDisplay()}" > {:else} diff --git a/src/controls/ColorTagger.svelte b/src/controls/ColorTagger.svelte index 724dac26..18d6b7bc 100644 --- a/src/controls/ColorTagger.svelte +++ b/src/controls/ColorTagger.svelte @@ -9,18 +9,18 @@ $: focusedColorIdx = $focusStore.focusedColors[0]; $: currentColor = currentPalette.colors[focusedColorIdx]; - // const updateTags = (updatedTags: string[]) => - // updateSemantics({ ...semantics, tags: updatedTags }); - // const updateSize = (size: (typeof sizes)[number]) => - // updateSemantics({ ...semantics, size }); + const updateTags = (updatedTags: string[]) => + updateSemantics({ ...currentColor, tags: updatedTags }); + const updateSize = (size: (typeof sizes)[number]) => + updateSemantics({ ...currentColor, size }); - // const updateMarkType = (markType: (typeof markTypes)[number]) => - // updateSemantics({ ...semantics, markType }); - // function updateSemantics(updatedSemantics: typeof semantics) { - // const newSemantics = [...currentPalette.colorSemantics]; - // newSemantics[focusedColorIdx] = updatedSemantics; - // colorStore.updateColorSemantics(newSemantics); - // } + const updateMarkType = (markType: (typeof markTypes)[number]) => + updateSemantics({ ...currentColor, markType }); + function updateSemantics(updatedColor: typeof currentColor) { + const updatedColors = [...currentPalette.colors]; + updatedColors[focusedColorIdx] = updatedColor; + colorStore.setCurrentPalColors(updatedColors); + } let tagInput = ""; const sizes = [undefined, "small", "medium", "large"] as const; const markTypes = [ @@ -38,22 +38,22 @@
These to mark properties like color, brand, and so on
- - +