bug fix
This commit is contained in:
@@ -10,6 +10,8 @@ import { getUserData } from "../../../../../functions/getUserData";
|
|||||||
import { useSceneContext } from "../../../sceneContext";
|
import { useSceneContext } from "../../../sceneContext";
|
||||||
import { useVersionContext } from "../../../../builder/version/versionContext";
|
import { useVersionContext } from "../../../../builder/version/versionContext";
|
||||||
|
|
||||||
|
// import { setAssetsApi } from "../../../../../services/factoryBuilder/asset/floorAsset/setAssetsApi";
|
||||||
|
|
||||||
const CopyPasteControls3D = ({
|
const CopyPasteControls3D = ({
|
||||||
copiedObjects,
|
copiedObjects,
|
||||||
setCopiedObjects,
|
setCopiedObjects,
|
||||||
@@ -419,21 +421,6 @@ const CopyPasteControls3D = ({
|
|||||||
|
|
||||||
newFloorItem.eventData = eventData;
|
newFloorItem.eventData = eventData;
|
||||||
|
|
||||||
//REST
|
|
||||||
|
|
||||||
// await setAssetsApi(
|
|
||||||
// organization,
|
|
||||||
// pastedAsset.uuid,
|
|
||||||
// pastedAsset.userData.name,
|
|
||||||
// [worldPosition.x, worldPosition.y, worldPosition.z],
|
|
||||||
// { "x": pastedAsset.rotation.x, "y": pastedAsset.rotation.y, "z": pastedAsset.rotation.z },
|
|
||||||
// pastedAsset.userData.modelId,
|
|
||||||
// false,
|
|
||||||
// true,
|
|
||||||
// );
|
|
||||||
|
|
||||||
//SOCKET
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
organization,
|
organization,
|
||||||
modelUuid: newFloorItem.modelUuid,
|
modelUuid: newFloorItem.modelUuid,
|
||||||
@@ -450,6 +437,12 @@ const CopyPasteControls3D = ({
|
|||||||
projectId
|
projectId
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//REST
|
||||||
|
|
||||||
|
// await setAssetsApi(data);
|
||||||
|
|
||||||
|
//SOCKET
|
||||||
|
|
||||||
socket.emit("v1:model-asset:add", data);
|
socket.emit("v1:model-asset:add", data);
|
||||||
|
|
||||||
const asset: Asset = {
|
const asset: Asset = {
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import { getUserData } from "../../../../../functions/getUserData";
|
|||||||
import { useSceneContext } from "../../../sceneContext";
|
import { useSceneContext } from "../../../sceneContext";
|
||||||
import { useVersionContext } from "../../../../builder/version/versionContext";
|
import { useVersionContext } from "../../../../builder/version/versionContext";
|
||||||
|
|
||||||
|
// import { setAssetsApi } from "../../../../../services/factoryBuilder/asset/floorAsset/setAssetsApi";
|
||||||
|
|
||||||
const DuplicationControls3D = ({
|
const DuplicationControls3D = ({
|
||||||
duplicatedObjects,
|
duplicatedObjects,
|
||||||
setDuplicatedObjects,
|
setDuplicatedObjects,
|
||||||
@@ -420,21 +422,6 @@ const DuplicationControls3D = ({
|
|||||||
|
|
||||||
newFloorItem.eventData = eventData;
|
newFloorItem.eventData = eventData;
|
||||||
|
|
||||||
//REST
|
|
||||||
|
|
||||||
// await setAssetsApi(
|
|
||||||
// organization,
|
|
||||||
// pastedAsset.uuid,
|
|
||||||
// pastedAsset.userData.name,
|
|
||||||
// [worldPosition.x, worldPosition.y, worldPosition.z],
|
|
||||||
// { "x": pastedAsset.rotation.x, "y": pastedAsset.rotation.y, "z": pastedAsset.rotation.z },
|
|
||||||
// pastedAsset.userData.modelId,
|
|
||||||
// false,
|
|
||||||
// true,
|
|
||||||
// );
|
|
||||||
|
|
||||||
//SOCKET
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
organization,
|
organization,
|
||||||
modelUuid: newFloorItem.modelUuid,
|
modelUuid: newFloorItem.modelUuid,
|
||||||
@@ -451,6 +438,12 @@ const DuplicationControls3D = ({
|
|||||||
projectId
|
projectId
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//REST
|
||||||
|
|
||||||
|
// await setAssetsApi(data);
|
||||||
|
|
||||||
|
//SOCKET
|
||||||
|
|
||||||
socket.emit("v1:model-asset:add", data);
|
socket.emit("v1:model-asset:add", data);
|
||||||
|
|
||||||
const asset: Asset = {
|
const asset: Asset = {
|
||||||
|
|||||||
@@ -341,21 +341,6 @@ function MoveControls3D({
|
|||||||
rotation: [movedAsset.rotation.x, movedAsset.rotation.y, movedAsset.rotation.z],
|
rotation: [movedAsset.rotation.x, movedAsset.rotation.y, movedAsset.rotation.z],
|
||||||
});
|
});
|
||||||
|
|
||||||
//REST
|
|
||||||
|
|
||||||
// await setAssetsApi(
|
|
||||||
// organization,
|
|
||||||
// obj.uuid,
|
|
||||||
// obj.userData.name,
|
|
||||||
// [worldPosition.x, worldPosition.y, worldPosition.z],
|
|
||||||
// { "x": obj.rotation.x, "y": obj.rotation.y, "z": obj.rotation.z },
|
|
||||||
// obj.userData.modelId,
|
|
||||||
// false,
|
|
||||||
// true,
|
|
||||||
// );
|
|
||||||
|
|
||||||
//SOCKET
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
organization,
|
organization,
|
||||||
modelUuid: newFloorItem.modelUuid,
|
modelUuid: newFloorItem.modelUuid,
|
||||||
@@ -371,6 +356,12 @@ function MoveControls3D({
|
|||||||
userId
|
userId
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//REST
|
||||||
|
|
||||||
|
// await setAssetsApi(data);
|
||||||
|
|
||||||
|
//SOCKET
|
||||||
|
|
||||||
socket.emit("v1:model-asset:add", data);
|
socket.emit("v1:model-asset:add", data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -278,32 +278,13 @@ function RotateControls3D({
|
|||||||
rotation: rotationArray,
|
rotation: rotationArray,
|
||||||
});
|
});
|
||||||
|
|
||||||
//REST
|
|
||||||
|
|
||||||
// await setAssetsApi(
|
|
||||||
// organization,
|
|
||||||
// obj.uuid,
|
|
||||||
// obj.userData.name,
|
|
||||||
// [worldPosition.x, worldPosition.y, worldPosition.z],
|
|
||||||
// { "x": obj.rotation.x, "y": obj.rotation.y, "z": obj.rotation.z },
|
|
||||||
// obj.userData.modelId,
|
|
||||||
// false,
|
|
||||||
// true,
|
|
||||||
// );
|
|
||||||
|
|
||||||
//SOCKET
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
organization,
|
organization,
|
||||||
modelUuid: newFloorItem.modelUuid,
|
modelUuid: newFloorItem.modelUuid,
|
||||||
modelName: newFloorItem.modelName,
|
modelName: newFloorItem.modelName,
|
||||||
assetId: newFloorItem.assetId,
|
assetId: newFloorItem.assetId,
|
||||||
position: newFloorItem.position,
|
position: newFloorItem.position,
|
||||||
rotation: {
|
rotation: { x: obj.rotation.x, y: obj.rotation.y, z: obj.rotation.z },
|
||||||
x: obj.rotation.x,
|
|
||||||
y: obj.rotation.y,
|
|
||||||
z: obj.rotation.z
|
|
||||||
},
|
|
||||||
isLocked: false,
|
isLocked: false,
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
socketId: socket.id,
|
socketId: socket.id,
|
||||||
@@ -312,6 +293,12 @@ function RotateControls3D({
|
|||||||
userId
|
userId
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//REST
|
||||||
|
|
||||||
|
// await setAssetsApi(data);
|
||||||
|
|
||||||
|
//SOCKET
|
||||||
|
|
||||||
socket.emit("v1:model-asset:add", data);
|
socket.emit("v1:model-asset:add", data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user