@@ -142,7 +142,19 @@ export default class EditTool {
142142 //拾取标绘图元
143143 const pick = this . _scene . pick ( event . position ) ;
144144
145- if ( ! defined ( pick ) ) return ;
145+ if ( ! defined ( pick ) ) {
146+ if ( this . _selectPlot ) {
147+ if ( this . _selectPlot . _positionBillboards ) {
148+ this . _scene . primitives . remove ( this . _selectPlot . _positionBillboards ) ;
149+ this . _selectPlot . _positionBillboards = undefined ;
150+ }
151+ if ( this . _selectPlot . _shapeBillboards ) {
152+ this . _scene . primitives . remove ( this . _selectPlot . _shapeBillboards ) ;
153+ this . _selectPlot . _shapeBillboards = undefined ;
154+ }
155+ }
156+ return ;
157+ }
146158
147159 let { primitive} = pick ;
148160 let { pointType, _plotId} = primitive ;
@@ -161,6 +173,12 @@ export default class EditTool {
161173 } else if ( defined ( primitive . pickedPrimitive ) ) {
162174 //是标绘图元
163175 let { positions} = primitive . pickedPrimitive ;
176+ if ( that . _selectPlot && that . _selectPlot . _positionBillboards ) {
177+ that . _scene . primitives . remove ( that . _selectPlot . _positionBillboards ) ;
178+ that . _scene . primitives . remove ( that . _selectPlot . _shapeBillboards ) ;
179+ that . _selectPlot . _positionBillboards = undefined ;
180+ that . _selectPlot . _shapeBillboards = undefined ;
181+ }
164182 //暂存标绘图元
165183 that . _selectPlot = primitive . pickedPrimitive ;
166184 //获取控制点高度
@@ -184,18 +202,20 @@ export default class EditTool {
184202 //规则线二
185203 case "msbl_regularline2" :
186204 //非规则符号
187- case "msbl_AssaultArrow" :
188- case "msbl_MultiArrow" :
189- case "msbl_CombinationalCircle" :
190- case "msbl_AntiAircraftGroup" :
191- case "msbl_cannonGroup" :
192- case "msbl_Kidney" :
193- case "msbl_doublearrow" :
194- case "msbl_singleArrow" :
195- case "msbl_squadarrow" :
196- case "msbl_FigureFan" :
197205 case "simplearea" :
198206 case "simpleline" :
207+ case "irregular" :
208+ case "kidney" :
209+ case "sector" :
210+ case "combinationcircle" :
211+ case "pathway" :
212+ case "triangle" :
213+ case "singlearrow" :
214+ case "multiarrow" :
215+ case "doublearrow" :
216+ case "squadarrow" :
217+ case "assaultarrow" :
218+ case "tailedsquadarrow" :
199219 let cneter = this . _getCenter ( that . _selectPlot . positions ) ;
200220 //设置位置控制点
201221 that . _setPositionControl ( Cesium . Cartesian3 . fromDegrees ( cneter . geometry . coordinates [ 0 ] , cneter . geometry . coordinates [ 1 ] , that . _controlHeight ) , undefined , primitive . pickedPrimitive ) ;
0 commit comments