From d4a767f93ea7bdd382e4657fc8dbee2c4d64f671 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 7 Oct 2022 08:46:38 +0100 Subject: [PATCH] Improve row vs column detection to fix any edge cases --- .../client/src/components/Component.svelte | 6 +- .../src/components/preview/DNDHandler.svelte | 219 ++++-------------- .../preview/DNDPositionIndicator.svelte | 66 ------ 3 files changed, 44 insertions(+), 247 deletions(-) delete mode 100644 packages/client/src/components/preview/DNDPositionIndicator.svelte diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index ba5ca95f5a..0f60c7f707 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -28,7 +28,6 @@ export let isScreen = false export let isBlock = false export let parent = null - export let index = 0 // Get parent contexts const context = getContext("context") @@ -463,14 +462,13 @@ data-name={name} data-icon={icon} data-parent={parent} - data-index={index} > {#if hasMissingRequiredSettings} {:else if children.length} - {#each children as child, idx (child._id)} - + {#each children as child (child._id)} + {/each} {:else if emptyState} {#if isScreen} diff --git a/packages/client/src/components/preview/DNDHandler.svelte b/packages/client/src/components/preview/DNDHandler.svelte index 37bd9d3402..50ea287a9b 100644 --- a/packages/client/src/components/preview/DNDHandler.svelte +++ b/packages/client/src/components/preview/DNDHandler.svelte @@ -9,32 +9,14 @@ - -{#key renderKey} - {#if dimensions && dropInfo?.mode !== "inside"} - - {/if} -{/key}