fix:
- react-hooks/exhaustive-deps added - style update - key fix
This commit is contained in:
@@ -78,8 +78,8 @@ const AssetProperties: React.FC = () => {
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div className="header">User Data</div>
|
<div className="header">User Data</div>
|
||||||
{userData.map((data) => (
|
{userData.map((data, i) => (
|
||||||
<div className="input-container">
|
<div className="input-container" key={i}>
|
||||||
<InputWithDropDown
|
<InputWithDropDown
|
||||||
key={data.id}
|
key={data.id}
|
||||||
label={data.label}
|
label={data.label}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ function MoveControls3D({ boundingBoxRef }: any) {
|
|||||||
setContextAction(null);
|
setContextAction(null);
|
||||||
moveAssets()
|
moveAssets()
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [contextAction])
|
}, [contextAction])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -176,6 +177,7 @@ function MoveControls3D({ boundingBoxRef }: any) {
|
|||||||
canvasElement.removeEventListener("keydown", onKeyDown);
|
canvasElement.removeEventListener("keydown", onKeyDown);
|
||||||
canvasElement?.removeEventListener("keyup", onKeyUp);
|
canvasElement?.removeEventListener("keyup", onKeyUp);
|
||||||
};
|
};
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [camera, controls, scene, toggleView, selectedAssets, socket, pastedObjects, duplicatedObjects, movedObjects, rotatedObjects, keyEvent, initialStates]);
|
}, [camera, controls, scene, toggleView, selectedAssets, socket, pastedObjects, duplicatedObjects, movedObjects, rotatedObjects, keyEvent, initialStates]);
|
||||||
|
|
||||||
const calculateDragOffset = useCallback((point: THREE.Object3D, hitPoint: THREE.Vector3) => {
|
const calculateDragOffset = useCallback((point: THREE.Object3D, hitPoint: THREE.Vector3) => {
|
||||||
@@ -223,6 +225,7 @@ function MoveControls3D({ boundingBoxRef }: any) {
|
|||||||
setDragOffset(newOffset);
|
setDragOffset(newOffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [axisConstraint, camera, movedObjects])
|
}, [axisConstraint, camera, movedObjects])
|
||||||
|
|
||||||
useFrame(() => {
|
useFrame(() => {
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ const SelectionControls3D: React.FC = () => {
|
|||||||
setContextAction(null);
|
setContextAction(null);
|
||||||
deleteSelection()
|
deleteSelection()
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [contextAction])
|
}, [contextAction])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -222,12 +223,14 @@ const SelectionControls3D: React.FC = () => {
|
|||||||
helper.enabled = false;
|
helper.enabled = false;
|
||||||
helper.dispose();
|
helper.dispose();
|
||||||
};
|
};
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [camera, controls, scene, toggleView, selectedAssets, copiedObjects, pastedObjects, duplicatedObjects, movedObjects, socket, rotatedObjects, activeModule, toolMode]);
|
}, [camera, controls, scene, toggleView, selectedAssets, copiedObjects, pastedObjects, duplicatedObjects, movedObjects, socket, rotatedObjects, activeModule, toolMode]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (activeModule !== "builder" || toolMode !== 'cursor' || toggleView) {
|
if (activeModule !== "builder" || toolMode !== 'cursor' || toggleView) {
|
||||||
clearSelection();
|
clearSelection();
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [activeModule, toolMode, toggleView]);
|
}, [activeModule, toolMode, toggleView]);
|
||||||
|
|
||||||
const selectAssets = useCallback(() => {
|
const selectAssets = useCallback(() => {
|
||||||
@@ -362,7 +365,7 @@ const SelectionControls3D: React.FC = () => {
|
|||||||
removeAsset(uuid);
|
removeAsset(uuid);
|
||||||
});
|
});
|
||||||
|
|
||||||
echo.success("Selected models removed!");
|
echo.warn("Selected models removed!");
|
||||||
clearSelection();
|
clearSelection();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
border-radius: #{$border-radius-large};
|
border-radius: #{$border-radius-large};
|
||||||
outline: 1px solid var(--border-color);
|
outline: 1px solid var(--border-color);
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
.header {
|
.header {
|
||||||
@include flex-center;
|
@include flex-center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|||||||
Reference in New Issue
Block a user