fix: 绘制中途退出,残留线段问题

This commit is contained in:
liqikun 2024-05-28 11:06:58 +08:00
parent bb4373cf7c
commit 7d75b6414e

View File

@ -824,6 +824,7 @@ export default class Base {
this.polygonEntity = null; this.polygonEntity = null;
this.outlineEntity = null; this.outlineEntity = null;
this.lineEntity = null; this.lineEntity = null;
if(this.points.length <= 2) this.removeTempLine();
} else if (this.type === 'line') { } else if (this.type === 'line') {
this.viewer.entities.remove(this.lineEntity); this.viewer.entities.remove(this.lineEntity);
} }