From 2bf7b13fc2eccc1206eb9455d372d84c0a886915 Mon Sep 17 00:00:00 2001 From: Xinyi Xu Date: Thu, 18 May 2023 12:10:36 -0700 Subject: [PATCH] fix(composer): click events for tag and overlay --- .../components/three-fiber/anchor/AnchorWidget.tsx | 2 -- .../DataOverlayComponent/DataOverlayContainer.tsx | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/scene-composer/src/augmentations/components/three-fiber/anchor/AnchorWidget.tsx b/packages/scene-composer/src/augmentations/components/three-fiber/anchor/AnchorWidget.tsx index b98a0d5ea..2af244740 100644 --- a/packages/scene-composer/src/augmentations/components/three-fiber/anchor/AnchorWidget.tsx +++ b/packages/scene-composer/src/augmentations/components/three-fiber/anchor/AnchorWidget.tsx @@ -178,8 +178,6 @@ export function AsyncLoadedAnchorWidget({ ], }); } - - event.stopPropagation(); } } }, diff --git a/packages/scene-composer/src/components/three-fiber/DataOverlayComponent/DataOverlayContainer.tsx b/packages/scene-composer/src/components/three-fiber/DataOverlayComponent/DataOverlayContainer.tsx index fe8519f77..4a2f350d2 100644 --- a/packages/scene-composer/src/components/three-fiber/DataOverlayComponent/DataOverlayContainer.tsx +++ b/packages/scene-composer/src/components/three-fiber/DataOverlayComponent/DataOverlayContainer.tsx @@ -55,7 +55,7 @@ export const DataOverlayContainer = ({ component, node }: DataOverlayContainerPr }, [componentVisible]); // Same behavior as other components to select node when clicked on the panel - const onPointerUp = useCallback( + const onClickContainer = useCallback( (e) => { e.stopPropagation(); if (selectedSceneNodeRef !== node.ref) { @@ -77,13 +77,12 @@ export const DataOverlayContainer = ({ component, node }: DataOverlayContainerPr <>
e.stopPropagation()} + onClick={onClickContainer} style={{ ...tmContainer, ...(isAnnotation ? tmAnnotationContainer : tmPanelContainer) }} > {!isAnnotation && !componentVisible && (
-