Skip to content

Commit 8a3eefa

Browse files
committed
【SDK】【Service】【优化标绘线绘制逻辑】
1 parent 4f61ad8 commit 8a3eefa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/service/3DPlot/Draw/DrawPolyline.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ export default class DrawPolyline extends DrawObject {
8484
that._isAdded = true;
8585
that._plotLayer._isDrawing = true;
8686
that._plotLayer._primitiveCollection.add(that._primitive);
87-
if(that._addedPlot){
88-
that._addedPlot(that._primitive);
89-
}
9087
}
9188

9289
if(!that._handler){
@@ -122,7 +119,11 @@ export default class DrawPolyline extends DrawObject {
122119
handler.setInputAction((event) => {
123120
this.fireFinishEvent({ plotObj3D: this._primitive });
124121
addExtendLayersPlot(this._plotLayer._linkTool, this._primitive);
122+
let _primitive = this._primitive
125123
this.disable();
124+
if(this._addedPlot){
125+
this._addedPlot(_primitive);
126+
}
126127
}, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
127128

128129
this._handler = handler;

0 commit comments

Comments
 (0)