From fc1d4359a914dcc281bda8a61dc44d2610c89dd5 Mon Sep 17 00:00:00 2001 From: Bui Trong Vuong Date: Fri, 14 Jun 2024 10:46:11 +0700 Subject: [PATCH] add align level column --- src/BimModel/src/DrawTool/src/Draw/DrawPoint.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/BimModel/src/DrawTool/src/Draw/DrawPoint.ts b/src/BimModel/src/DrawTool/src/Draw/DrawPoint.ts index e816f9b..2ce7428 100644 --- a/src/BimModel/src/DrawTool/src/Draw/DrawPoint.ts +++ b/src/BimModel/src/DrawTool/src/Draw/DrawPoint.ts @@ -4,6 +4,8 @@ import {BaseDraw} from "./BaseDraw"; import {IDrawType} from "@ModelingComponent/types"; import {LocationArc, LocationLine, LocationPoint} from "@BimModel/src/system"; import { + currentLevelSignal, + listLevelSignal, modelingSignal, modelStructureSignal, tempElementSignal, @@ -115,6 +117,7 @@ export class DrawPoint extends BaseDraw { const currentElementIndex = Object.keys( this.ProjectComponent.elements ).length; + switch (type) { case "Structure Beam": case "Structure Wall": @@ -130,6 +133,15 @@ export class DrawPoint extends BaseDraw { this.tempElement.attributes.Name = new IFC.IfcLabel( `${type} ${currentElementIndex + 1}` ); + if (currentLevelSignal.value) { + const level = + listLevelSignal.value[currentLevelSignal.value.index + 1]; + if (level) { + const height = + level.elevation - currentLevelSignal.value.elevation; + this.tempElement.height = height; + } + } } break; default: