From 9106592e6f1e73bdea4228cc01654774c4ae3c17 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Fri, 4 Nov 2022 14:54:55 +0100 Subject: [PATCH 1/3] Fix drag-drop with css and html --- src/Components/ElementsList/ElementsList.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Components/ElementsList/ElementsList.tsx b/src/Components/ElementsList/ElementsList.tsx index fb5b4d3..a450886 100644 --- a/src/Components/ElementsList/ElementsList.tsx +++ b/src/Components/ElementsList/ElementsList.tsx @@ -213,7 +213,7 @@ function ElementsListRow( return ; } From c9b5ae2f195f34b9200fd10cc0e626132afd2734 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Fri, 4 Nov 2022 15:09:52 +0100 Subject: [PATCH 2/3] Add missing key to span element --- src/Components/ElementsList/ElementsList.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/ElementsList/ElementsList.tsx b/src/Components/ElementsList/ElementsList.tsx index a450886..f068a2c 100644 --- a/src/Components/ElementsList/ElementsList.tsx +++ b/src/Components/ElementsList/ElementsList.tsx @@ -202,6 +202,7 @@ function ElementsListRow( for (let i = 0; i < depth; i++) { verticalBars.push( ); From 0d761e6a4117d0fb77a8473c2fd17621a9f14df8 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Fri, 4 Nov 2022 15:41:20 +0100 Subject: [PATCH 3/3] Fix mutation of config after SetContainerList --- src/Components/Editor/Actions/AddContainer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Editor/Actions/AddContainer.ts b/src/Components/Editor/Actions/AddContainer.ts index 89778ab..f3fd812 100644 --- a/src/Components/Editor/Actions/AddContainer.ts +++ b/src/Components/Editor/Actions/AddContainer.ts @@ -121,7 +121,7 @@ function AddNewContainerToParent( throw new Error(`[AddContainer] Object type not found among default config. Found: ${type}`); } - const containerConfig = Object.assign(defaultConfig, availableContainer); + const containerConfig = Object.assign(structuredClone(defaultConfig), availableContainer); // Default margin const left: number = containerConfig.Margin?.left ?? 0;