Merge remote-tracking branch 'origin/main-dev' into main-demo

This commit is contained in:
2025-12-20 13:19:47 +05:30
2 changed files with 9 additions and 0 deletions

View File

@@ -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;

View File

@@ -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);