From 482a10b2680569309760f6ffde71594cc1316a28 Mon Sep 17 00:00:00 2001 From: Kavin Venkatachalam Date: Thu, 11 Jan 2024 16:00:34 +0530 Subject: [PATCH] Fixed bug on hovering the child elements --- frontend/src/Editor/DragContainer.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/Editor/DragContainer.jsx b/frontend/src/Editor/DragContainer.jsx index 87ae10b17b..544aff87fe 100644 --- a/frontend/src/Editor/DragContainer.jsx +++ b/frontend/src/Editor/DragContainer.jsx @@ -52,8 +52,8 @@ const MouseCustomAble = { props: {}, events: {}, mouseEnter(e) { - console.log('MouseCustomAble ENTER', e); - const controlBoxes = document.getElementsByClassName('.moveable-control-box'); + console.log('here--- ', e); + const controlBoxes = document.getElementsByClassName('moveable-control-box'); for (const element of controlBoxes) { element.classList.remove('moveable-control-box-d-block'); } @@ -313,7 +313,7 @@ export default function DragContainer({ ref={moveableRef} ables={[MouseCustomAble, DimensionViewable]} props={{ - mouseTest: true, + mouseTest: selectedComponents.length < 2, dimensionViewable: selectedComponents.length > 1, }} flushSync={flushSync} @@ -687,7 +687,7 @@ export default function DragContainer({ ref={(el) => (childMoveableRefs.current[i.parent] = el)} ables={[MouseCustomAble, DimensionViewable]} props={{ - mouseTest: true, + mouseTest: selectedComponents.length < 2, dimensionViewable: selectedComponents.length > 2, }} target={