Fix stale hover indiciator

This commit is contained in:
Andrew Kingston 2022-10-21 17:51:25 +01:00
parent 4dc6b869a8
commit 24cc71267c
1 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,13 @@
import { builderStore, dndIsDragging } from "stores" import { builderStore, dndIsDragging } from "stores"
let componentId let componentId
$: zIndex = componentId === $builderStore.selectedComponentId ? 900 : 920 $: zIndex = componentId === $builderStore.selectedComponentId ? 900 : 920
$: {
if ($dndIsDragging) {
componentId = null
}
}
const onMouseOver = e => { const onMouseOver = e => {
// Ignore if dragging // Ignore if dragging
@ -43,7 +49,7 @@
</script> </script>
<IndicatorSet <IndicatorSet
componentId={$dndIsDragging ? null : componentId} {componentId}
color="var(--spectrum-global-color-static-blue-200)" color="var(--spectrum-global-color-static-blue-200)"
transition transition
{zIndex} {zIndex}