From 1116f1ae3fbf1cb40cb62aff1936218f23024ec5 Mon Sep 17 00:00:00 2001 From: Michael Mainguy Date: Sat, 13 Apr 2024 13:01:35 -0500 Subject: [PATCH] fixed label location for connections. --- src/util/functions/updateTextNode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/functions/updateTextNode.ts b/src/util/functions/updateTextNode.ts index 6aa2cbc..19a323a 100644 --- a/src/util/functions/updateTextNode.ts +++ b/src/util/functions/updateTextNode.ts @@ -10,7 +10,7 @@ export function updateTextNode(mesh: AbstractMesh, text: string) { return null; } const textNodes = mesh.getChildren((node) => { - return node.metadata?.label == true; + return node.metadata?.text == true; }); if (textNodes && textNodes.length > 0) { textNodes.forEach((node) => { @@ -69,7 +69,7 @@ function createPlane(mat: Material, mesh: AbstractMesh, text: string, planeWidth plane.metadata = {exportable: true, label: true}; if (mesh.metadata?.template == "#connection-template") { plane.billboardMode = AbstractMesh.BILLBOARDMODE_Y; - plane.position.y = mesh.absolutePosition.y + .1; + plane.position.y = mesh.position.y + .1; } else { plane.position.y = yOffset + (height * plane.scaling.y);