Refactor interaction handling: change click events to double-click for DecalInstance, FloorInstance, and Wall components. Prevent event propagation to ensure proper selection behavior.

This commit is contained in:
2025-06-27 15:58:34 +05:30
parent edf76fa1c9
commit 12f1dd1771
3 changed files with 5 additions and 2 deletions

View File

@@ -21,9 +21,10 @@ function DecalInstance({ visible = true, decal }: { visible?: boolean, decal: De
rotation={[0, 0, decal.decalRotation]}
scale={[decal.decalScale, decal.decalScale, 0.01]}
userData={decal}
onClick={(e) => {
onDoubleClick={(e) => {
if (visible && !togglView && activeModule === 'builder') {
if (e.object.userData.decalUuid) {
e.stopPropagation();
setSelectedDecal(e.object);
setSelectedWall(null);
setSelectedFloor(null);