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