坡度删除bug修复

This commit is contained in:
joylink_zhaoerwei 2023-08-07 17:06:50 +08:00
parent 344443ca51
commit 4fe2578704

View File

@ -65,11 +65,17 @@ export class SlopeDraw extends GraphicDrawAssistant<SlopeTemplate, ISlopeData> {
const slopes = this.app.queryStore const slopes = this.app.queryStore
.queryByType<Slope>(Slope.Type) .queryByType<Slope>(Slope.Type)
.filter((g) => { .filter((g) => {
const refSlopeKiloMarker = this.app.queryStore.queryById( let refSlopeKiloMarker;
g.datas.refDeviceId[0] try {
) as SlopeKiloMarker; refSlopeKiloMarker = this.app.queryStore.queryById(
g.datas.refDeviceId[0]
) as SlopeKiloMarker;
} catch (error) {
this.app.deleteGraphics(g);
}
return ( return (
refSlopeKiloMarker.datas.kilometerSystem[0].direction == dirSlop refSlopeKiloMarker?.datas.kilometerSystem[0].direction == dirSlop
); );
}); });
const slopeKiloMarkers = this.app.queryStore const slopeKiloMarkers = this.app.queryStore