Allow view deselect when clicking on empty area. Screen is no longer highlighted
This commit is contained in:
parent
a5da7946db
commit
308897d972
|
@ -37,6 +37,7 @@
|
|||
"svg",
|
||||
"bmp",
|
||||
"jfif",
|
||||
"webp",
|
||||
]
|
||||
|
||||
const fieldId = id || uuid()
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
// Catch any app errors
|
||||
loading = false
|
||||
error = event.error || "An unknown error occurred"
|
||||
} else if (type === "select-component" && data.id) {
|
||||
} else if (type === "select-component" && "id" in data) {
|
||||
componentStore.select(data.id)
|
||||
} else if (type === "hover-component") {
|
||||
hoverStore.hover(data.id, false)
|
||||
|
|
|
@ -284,10 +284,6 @@
|
|||
<div
|
||||
class="main-wrapper"
|
||||
on:click={() => {
|
||||
// inBuilder
|
||||
// check selected
|
||||
// selectedComponentId : "ce300d7f6c08b432b8db18d11690932f5"
|
||||
console.log("Screen check ", $builderStore)
|
||||
if ($builderStore.inBuilder) {
|
||||
builderStore.actions.selectComponent(null)
|
||||
}
|
||||
|
|
|
@ -5,10 +5,14 @@
|
|||
$: color = $builderStore.editMode
|
||||
? "var(--spectrum-global-color-static-green-500)"
|
||||
: "var(--spectrum-global-color-static-blue-600)"
|
||||
|
||||
$: isScreen = $builderStore.selectedComponentId?.startsWith(
|
||||
$builderStore.screen._id
|
||||
)
|
||||
</script>
|
||||
|
||||
<IndicatorSet
|
||||
componentId={$builderStore.selectedComponentId}
|
||||
componentId={!isScreen ? $builderStore.selectedComponentId : null}
|
||||
{color}
|
||||
zIndex="910"
|
||||
transition
|
||||
|
|
Loading…
Reference in New Issue