From da6400ea677ffa04dc9d82016d4e64cde3d776c0 Mon Sep 17 00:00:00 2001 From: Jerald-Golden-B Date: Mon, 8 Sep 2025 15:07:51 +0530 Subject: [PATCH] Refactor wall classification logic for improved performance and readability; optimize wall merging and polygon generation. Update wall and zone creators to handle snapping and point connections more effectively. Enhance camera switch view functionality and clean up shortcut key handling. --- app/src/components/Dashboard/SidePannel.tsx | 38 +- .../aisle/aisleCreator/aisleCreator.tsx | 33 +- .../floor/floorCreator/floorCreator.tsx | 6 +- .../point/helpers/usePointSnapping.tsx | 575 +++++++++--------- .../instance/helpers/useWallClassification.ts | 185 ++---- .../builder/wall/Instances/wallInstances.tsx | 2 +- .../wall/wallCreator/referenceWall.tsx | 51 +- .../builder/wall/wallCreator/wallCreator.tsx | 30 +- .../builder/zone/zoneCreator/zoneCreator.tsx | 6 +- app/src/modules/scene/camera/switchView.tsx | 32 +- app/src/modules/scene/controls/controls.tsx | 8 +- app/src/store/builder/useVersionStore.ts | 4 +- .../utils/shortcutkeys/handleShortcutKeys.ts | 4 - 13 files changed, 460 insertions(+), 514 deletions(-) diff --git a/app/src/components/Dashboard/SidePannel.tsx b/app/src/components/Dashboard/SidePannel.tsx index f384d99..50dda20 100644 --- a/app/src/components/Dashboard/SidePannel.tsx +++ b/app/src/components/Dashboard/SidePannel.tsx @@ -1,13 +1,5 @@ import React from "react"; -import { - DocumentationIcon, - HelpIcon, - HomeIcon, - LogoutIcon, - NotificationIcon, - ProjectsIcon, - TutorialsIcon, -} from "../icons/DashboardIcon"; +import { DocumentationIcon, HelpIcon, HomeIcon, LogoutIcon, NotificationIcon, ProjectsIcon, TutorialsIcon } from "../icons/DashboardIcon"; import { useNavigate } from "react-router-dom"; import darkThemeImage from "../../assets/image/darkThemeProject.png"; import lightThemeImage from "../../assets/image/lightThemeProject.png"; @@ -54,7 +46,6 @@ const SidePannel: React.FC = ({ setActiveTab, activeTab }) => { projectUuid: projectId, }; - console.log('addProject: ', addProject); projectSocket.emit("v1:project:add", addProject); } else { // API @@ -72,11 +63,7 @@ const SidePannel: React.FC = ({ setActiveTab, activeTab }) => {
{userName?.charAt(0).toUpperCase()}
-
- {userName - ? userName.charAt(0).toUpperCase() + userName.slice(1).toLowerCase() - : "Anonymous"} -
+
{userName ? userName.charAt(0).toUpperCase() + userName.slice(1).toLowerCase() : "Anonymous"}
@@ -87,26 +74,15 @@ const SidePannel: React.FC = ({ setActiveTab, activeTab }) => {
- - - @@ -123,9 +99,7 @@ const SidePannel: React.FC = ({ setActiveTab, activeTab }) => { Tutorials