From ebe95a45e30ce0740010355b534c97a168799ed6 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Tue, 8 Aug 2023 10:21:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9D=A1=E5=BA=A6=E5=92=8C?= =?UTF-8?q?=E6=9B=B2=E5=BA=A6=E6=9C=AA=E5=A1=AB=E6=95=B0=E6=8D=AE=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=97=B6=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/curvature/CurvatureAssistant.ts | 2 +- src/graphics/slope/SlopeAssistant.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics/curvature/CurvatureAssistant.ts b/src/graphics/curvature/CurvatureAssistant.ts index 5330b89..48ae0b2 100644 --- a/src/graphics/curvature/CurvatureAssistant.ts +++ b/src/graphics/curvature/CurvatureAssistant.ts @@ -89,7 +89,7 @@ export class CurvatureDraw extends GraphicDrawAssistant< }); const curvatureKiloMarkers = this.app.queryStore .queryByType(CurvatureKiloMarker.Type) - .filter((g) => g.datas.kilometerSystem[0].direction == dirSlop); + .filter((g) => g.datas.kilometerSystem[0]?.direction == dirSlop); curvatureKiloMarkers.sort((a, b) => a.position.x - b.position.x); const curvatureKiloMarkersPos = curvatureKiloMarkers.map( (g) => g.position.x diff --git a/src/graphics/slope/SlopeAssistant.ts b/src/graphics/slope/SlopeAssistant.ts index 98b220e..a2199aa 100644 --- a/src/graphics/slope/SlopeAssistant.ts +++ b/src/graphics/slope/SlopeAssistant.ts @@ -80,7 +80,7 @@ export class SlopeDraw extends GraphicDrawAssistant { }); const slopeKiloMarkers = this.app.queryStore .queryByType(SlopeKiloMarker.Type) - .filter((g) => g.datas.kilometerSystem[0].direction == dirSlop); + .filter((g) => g.datas.kilometerSystem[0]?.direction == dirSlop); slopeKiloMarkers.sort((a, b) => a.position.x - b.position.x); const slopeKiloMarkersPos = slopeKiloMarkers.map((g) => g.position.x); //检验坡度有效性--是否有增加和删除