the-pudding / sleep-training

MIT License
0 stars 0 forks source link

focusHover persisting #33

Closed tomvaillant closed 3 weeks ago

tomvaillant commented 3 weeks ago

When I toggle a focusHover on scroll via the stepHandlers in Index.svelte, then passed as a prop to Section, to ScrollSection, to ForceBubbles, to Circle, the tooltip does not automatically disappear on the next step even if I try to override the value in the same handler by resetting focusHover to null as soon as the next step is active.

Tried but not sure how to handle this :(

function SectionMain(step) { switch (true) { case step >= 0 && step < 1: return { renderedData: data.reddit, focusHover: null, } case step >= 1 && step < 2: return { renderedData: data.reddit, focusHover: focusRedditResearch, }