修改坡度和曲度未填数据生成时报错问题

This commit is contained in:
dong 2023-08-08 10:21:30 +08:00
parent 4a96f250ef
commit ebe95a45e3
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ export class CurvatureDraw extends GraphicDrawAssistant<
});
const curvatureKiloMarkers = this.app.queryStore
.queryByType<CurvatureKiloMarker>(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

View File

@ -80,7 +80,7 @@ export class SlopeDraw extends GraphicDrawAssistant<SlopeTemplate, ISlopeData> {
});
const slopeKiloMarkers = this.app.queryStore
.queryByType<SlopeKiloMarker>(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);
//检验坡度有效性--是否有增加和删除