Refactor floor management APIs: implement getFloorsApi, deleteFloorApi, and upsertFloorApi for enhanced floor data handling. Update FloorCreator for improved point snapping and floor creation logic. Modify ReferencePoint to include UUID and user data. Adjust usePointSnapping to handle temporary points more effectively.
This commit is contained in:
@@ -201,10 +201,13 @@ export const usePointSnapping = (currentPoint: { uuid: string, pointType: string
|
||||
);
|
||||
}, [floors, currentPoint]);
|
||||
|
||||
const snapFloorPoint = useCallback((position: [number, number, number], tempPoints: Point[] | []) => {
|
||||
const snapFloorPoint = useCallback((position: [number, number, number], tempPoints?: Point[] | []) => {
|
||||
if (!currentPoint || !CAN_POINT_SNAP) return { position: position, isSnapped: false, snappedPoint: null };
|
||||
|
||||
const otherPoints = [...getAllOtherFloorPoints(), ...tempPoints];
|
||||
const otherPoints = getAllOtherFloorPoints();
|
||||
if (tempPoints) {
|
||||
otherPoints.concat(tempPoints);
|
||||
}
|
||||
const currentVec = new THREE.Vector3(...position);
|
||||
|
||||
for (const point of otherPoints) {
|
||||
|
||||
Reference in New Issue
Block a user