From 86061543dde386888bfb60474ec818bc36875248 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 9 Aug 2024 08:52:03 +0100 Subject: [PATCH] Slightly improve the look and behaviour of working with grid components --- .../client/src/components/app/container/GridContainer.svelte | 2 +- packages/client/src/components/preview/GridDNDHandler.svelte | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/container/GridContainer.svelte b/packages/client/src/components/app/container/GridContainer.svelte index 6df0fdd2d4..8e8621c1a6 100644 --- a/packages/client/src/components/app/container/GridContainer.svelte +++ b/packages/client/src/components/app/container/GridContainer.svelte @@ -103,7 +103,7 @@ /* Highlight sibling borders when resizing childern */ :global(.grid.highlight > .component:not(.dragging)) { - outline: 1px solid var(--spectrum-global-color-static-blue-200); + outline: 2px solid var(--spectrum-global-color-static-blue-200); } /* Ensure all top level children have grid styles applied */ diff --git a/packages/client/src/components/preview/GridDNDHandler.svelte b/packages/client/src/components/preview/GridDNDHandler.svelte index fe004982d3..0a3ecad72c 100644 --- a/packages/client/src/components/preview/GridDNDHandler.svelte +++ b/packages/client/src/components/preview/GridDNDHandler.svelte @@ -147,6 +147,7 @@ if (!domGrid) { return } + builderStore.actions.selectComponent(id) // Apply active class to grid domComponent.parentNode.classList.add("dragging")