resolve conflicts
This commit is contained in:
@@ -2,6 +2,7 @@ import { useFrame, useThree } from "@react-three/fiber";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import * as THREE from "three";
|
||||
import * as Types from "../../../types/world/worldTypes";
|
||||
import * as SimulationTypes from "../../../types/simulation";
|
||||
import { QuadraticBezierLine } from "@react-three/drei";
|
||||
import {
|
||||
useDeleteTool,
|
||||
@@ -423,10 +424,10 @@ function PathConnector({
|
||||
|
||||
const updateBackend = async (
|
||||
updatedPaths: (
|
||||
| Types.ConveyorEventsSchema
|
||||
| Types.VehicleEventsSchema
|
||||
| Types.StaticMachineEventsSchema
|
||||
| Types.ArmBotEventsSchema
|
||||
| SimulationTypes.ConveyorEventsSchema
|
||||
| SimulationTypes.VehicleEventsSchema
|
||||
| SimulationTypes.StaticMachineEventsSchema
|
||||
| SimulationTypes.ArmBotEventsSchema
|
||||
)[]
|
||||
) => {
|
||||
if (updatedPaths.length === 0) return;
|
||||
@@ -1062,7 +1063,7 @@ function PathConnector({
|
||||
const updatedStates = simulationStates.map((state) => {
|
||||
// Handle Conveyor (which has multiple points)
|
||||
if (state.type === "Conveyor") {
|
||||
const updatedConveyor: Types.ConveyorEventsSchema = {
|
||||
const updatedConveyor: SimulationTypes.ConveyorEventsSchema = {
|
||||
...state,
|
||||
points: state.points.map((point) => {
|
||||
// Check if this point is either connection1 or connection2
|
||||
@@ -1101,7 +1102,7 @@ function PathConnector({
|
||||
(state.modeluuid === connection2.model &&
|
||||
state.points.uuid === connection2.point)
|
||||
) {
|
||||
const updatedVehicle: Types.VehicleEventsSchema = {
|
||||
const updatedVehicle: SimulationTypes.VehicleEventsSchema = {
|
||||
...state,
|
||||
points: {
|
||||
...state.points,
|
||||
@@ -1132,7 +1133,7 @@ function PathConnector({
|
||||
(state.modeluuid === connection2.model &&
|
||||
state.points.uuid === connection2.point)
|
||||
) {
|
||||
const updatedStaticMachine: Types.StaticMachineEventsSchema = {
|
||||
const updatedStaticMachine: SimulationTypes.StaticMachineEventsSchema = {
|
||||
...state,
|
||||
points: {
|
||||
...state.points,
|
||||
@@ -1163,7 +1164,7 @@ function PathConnector({
|
||||
(state.modeluuid === connection2.model &&
|
||||
state.points.uuid === connection2.point)
|
||||
) {
|
||||
const updatedArmBot: Types.ArmBotEventsSchema = {
|
||||
const updatedArmBot: SimulationTypes.ArmBotEventsSchema = {
|
||||
...state,
|
||||
points: {
|
||||
...state.points,
|
||||
|
||||
Reference in New Issue
Block a user