Merge remote-tracking branch 'origin/main-dev' into main-demo
This commit is contained in:
@@ -89,6 +89,13 @@ const DashboardEditor: React.FC = () => {
|
||||
const currentBlock = blocks.find((b) => b.blockUuid === selectedBlock);
|
||||
const currentElement = currentBlock?.elements.find((el) => el.elementUuid === selectedElement);
|
||||
|
||||
useEffect(()=>{
|
||||
if (!editMode) {
|
||||
setSelectedBlock(null);
|
||||
setSelectedElement(null);
|
||||
}
|
||||
},[editMode])
|
||||
|
||||
// Helper function to send updates to backend - only sends the specific block that changed
|
||||
const updateBackend = async (updatedBlock: Block) => {
|
||||
if (!projectId || !selectedVersion) return;
|
||||
|
||||
@@ -93,11 +93,13 @@ function PillarJibInstance({ crane }: { readonly crane: CraneStatus }) {
|
||||
|
||||
if (!crane.isActive && crane.currentPhase === "init" && crane.currentMaterials.length > 0 && action.maxPickUpCount <= crane.currentMaterials.length) {
|
||||
setCurrentPhase(crane.modelUuid, "init-pickup");
|
||||
setCraneActive(crane.modelUuid, true);
|
||||
} else if (crane.currentPhase === "picking" && crane.currentMaterials.length > 0 && action.maxPickUpCount <= crane.currentMaterials.length && !crane.isCarrying) {
|
||||
if (humanAsset?.animationState?.current === "working_standing" && humanAsset?.animationState?.isCompleted && humanId && humanAction && humanAction.actionType === "operator") {
|
||||
setCurrentAnimation(humanId, "idle", true, true, true);
|
||||
setIsCaryying(crane.modelUuid, true);
|
||||
setCurrentPhase(crane.modelUuid, "pickup-drop");
|
||||
setCraneActive(crane.modelUuid, true);
|
||||
} else {
|
||||
setCurrentPhaseHuman(humanId, "hooking");
|
||||
setHumanActive(humanId, true);
|
||||
|
||||
Reference in New Issue
Block a user