From 20d2c5956b688da83717cfd86faa2f4a25a2631c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Gonz=C3=A1lez=20Viegas?= Date: Sun, 13 Oct 2024 19:58:03 +0200 Subject: [PATCH] fix(front): correct outliner position in moved models --- packages/front/package.json | 2 +- packages/front/src/fragments/Outliner/index.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/front/package.json b/packages/front/package.json index 89bc2bcc9..469fe7a98 100644 --- a/packages/front/package.json +++ b/packages/front/package.json @@ -1,7 +1,7 @@ { "name": "@thatopen/components-front", "description": "Collection of frontend tools to author BIM apps.", - "version": "2.3.3", + "version": "2.3.4", "author": "That Open Company", "contributors": [ "Antonio Gonzalez Viegas (https://github.com/agviegas)", diff --git a/packages/front/src/fragments/Outliner/index.ts b/packages/front/src/fragments/Outliner/index.ts index caadc90b0..df6851fbc 100644 --- a/packages/front/src/fragments/Outliner/index.ts +++ b/packages/front/src/fragments/Outliner/index.ts @@ -87,6 +87,11 @@ export class Outliner extends OBC.Component implements OBC.Disposable { } const ids = items[fragID]; const clonedFrag = found.clone(ids); + + clonedFrag.mesh.position.set(0, 0, 0); + clonedFrag.mesh.rotation.set(0, 0, 0); + clonedFrag.mesh.applyMatrix4(found.mesh.matrixWorld); + clonedFrag.mesh.instanceColor = null; clonedFrag.mesh.material = [style.material]; style.meshes.add(clonedFrag.mesh);