From 066cf6c9735e047547b8ef17b6672de9f6f66740 Mon Sep 17 00:00:00 2001 From: Pedro Ferreira <10789765+apedroferreira@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:54:49 +0100 Subject: [PATCH] Disable dragging to column center, enable sides only --- .../src/components/AppEditor/PageEditor/RenderPanel.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/toolpad-app/src/components/AppEditor/PageEditor/RenderPanel.tsx b/packages/toolpad-app/src/components/AppEditor/PageEditor/RenderPanel.tsx index 9132f3a113f..bb540a508f2 100644 --- a/packages/toolpad-app/src/components/AppEditor/PageEditor/RenderPanel.tsx +++ b/packages/toolpad-app/src/components/AppEditor/PageEditor/RenderPanel.tsx @@ -429,11 +429,10 @@ export default function RenderPanel({ className }: RenderPanelProps) { const activeDropNodeRect = activeDropNodeInfo.rect; const isDraggingOverPage = appDom.isPage(activeDropNode); - - const isDraggingOverContainer = hasContainerComponent(activeDropNodeInfo); + const isDraggingOverRow = appDom.isElement(activeDropNode) && isPageRow(activeDropNode); let centerAreaFraction = 0; - if (isDraggingOverContainer || isDraggingOverPage) { + if (isDraggingOverPage || isDraggingOverRow) { centerAreaFraction = 1; }