diff --git a/src/content-modules/contextual-tools/InterpolatePoints.svelte b/src/content-modules/contextual-tools/InterpolatePoints.svelte index 12ffb1cf..f189f29d 100644 --- a/src/content-modules/contextual-tools/InterpolatePoints.svelte +++ b/src/content-modules/contextual-tools/InterpolatePoints.svelte @@ -9,6 +9,7 @@ import PalPreview from "../../components/PalPreview.svelte"; $: focusedColors = $focusStore.focusedColors; + $: focusSet = new Set(focusedColors); $: colors = $colorStore.currentPal.colors; let colorSpace = "lab"; let numPoints = 1; @@ -41,21 +42,15 @@ } return points; } - function createInterpolation(forPreview: boolean): Color[] { + function createInterpolation(): Color[] { const newColors = []; for (let idx = 0; idx < focusedColors.length - 1; idx++) { const pointA = colors[focusedColors[idx]]; const pointB = colors[focusedColors[idx + 1]]; const newPoints = createInterpolatedPoints(pointA, pointB); - if (forPreview) { - newColors.push(pointA, ...newPoints); - } else { - newColors.push(...newPoints); - } - } - if (forPreview) { - newColors.push(colors[focusedColors[focusedColors.length - 1]]); + newColors.push(pointA, ...newPoints); } + newColors.push(colors[focusedColors[focusedColors.length - 1]]); return newColors; } @@ -94,15 +89,13 @@