@kq_npm/client3d_webgl_vue 4.5.43 → 4.5.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -298,29 +298,31 @@ class TerrainOperationViewModel {
298
298
  if (this._globaOptions.viewer.terrainProvider.availability) {
299
299
  if (this._globaOptions.viewer.terrainProvider && !this._globaOptions.viewer.terrainProvider._heightmapStructure) {
300
300
  this.clear();
301
- this._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
302
- if (!shape.groupName || shape.groupName !== "TerrainOperationDraw") return;
303
- if (shape) {
304
- that._globaOptions.positions = shape._controlPoints;
305
- if (that._terrainStyle === 1) {
306
- that._positions.push(shape._controlPoints);
307
- if (that._terrainexcavationext) {
308
- that.setTerrainExcavationAddPolygon();
309
- } else {
310
- that.createTerrainExcavation(() => {
301
+ if(this._drawManager) {
302
+ this._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
303
+ if (!shape.groupName || shape.groupName !== "TerrainOperationDraw") return;
304
+ if (shape) {
305
+ that._globaOptions.positions = shape._controlPoints;
306
+ if (that._terrainStyle === 1) {
307
+ that._positions.push(shape._controlPoints);
308
+ if (that._terrainexcavationext) {
311
309
  that.setTerrainExcavationAddPolygon();
312
- });
313
- }
314
- } else if (that._terrainStyle === 2) {
315
- if (that._terrainmodification) {
316
- that.setTerrainModification();
317
- } else {
318
- that.createTerrainModification();
310
+ } else {
311
+ that.createTerrainExcavation(() => {
312
+ that.setTerrainExcavationAddPolygon();
313
+ });
314
+ }
315
+ } else if (that._terrainStyle === 2) {
316
+ if (that._terrainmodification) {
317
+ that.setTerrainModification();
318
+ } else {
319
+ that.createTerrainModification();
320
+ }
319
321
  }
320
322
  }
321
- }
322
- that._drawManager && that._drawManager.clearDrawGroup("TerrainOperationDraw");
323
- }, "TerrainOperationDraw");
323
+ that._drawManager.clearDrawGroup("TerrainOperationDraw");
324
+ }, "TerrainOperationDraw");
325
+ }
324
326
  } else {
325
327
  (0,message/* default */.A)({
326
328
  message: this._language["stkTerrainAnalysisTips"],
@@ -363,7 +365,8 @@ class TerrainOperationViewModel {
363
365
  }
364
366
  //清除全部结果
365
367
  clear() {
366
- this._drawManager.stopDraw();
368
+ this._drawManager?.clearDrawGroup("TerrainOperationDraw");
369
+ this._drawManager?.stopDraw();
367
370
  // 销毁地形开挖
368
371
  if (this._terrainexcavationext) {
369
372
  this._terrainexcavationext.destroy();
@@ -334,12 +334,12 @@ class TerrainProfileAnalysisViewModel {
334
334
  if (this._viewer.terrainProvider.availability) {
335
335
  if (this._viewer.terrainProvider && !this._viewer.terrainProvider._heightmapStructure) {
336
336
  this.clear();
337
- this._drawManager.startDraw("polyline", { clampToGround: true }, (feature, { shape }) => {
337
+ this._drawManager?.startDraw("polyline", { clampToGround: true }, (feature, { shape }) => {
338
338
  if (!shape.groupName || shape.groupName !== "TerrainProfileAnalysisDraw") return;
339
339
  if (shape) {
340
340
  that._terrainSlopeAnalyse.positions = shape._controlPoints;
341
341
  }
342
- that._drawManager && that._drawManager.clearDrawGroup("TerrainProfileAnalysisDraw");
342
+ that._drawManager.clearDrawGroup("TerrainProfileAnalysisDraw");
343
343
  }, "TerrainProfileAnalysisDraw");
344
344
  } else {
345
345
  (0,message/* default */.A)({
@@ -356,6 +356,7 @@ class TerrainProfileAnalysisViewModel {
356
356
  }
357
357
  //清除
358
358
  clear() {
359
+ this._drawManager?.clearDrawGroup("TerrainProfileAnalysisDraw");
359
360
  this._drawManager && this._drawManager.stopDraw();
360
361
  this._terrainSlopeAnalyse && this._terrainSlopeAnalyse.clear();
361
362
  for (let index = 0; index < this.divPointArr.length; index++) {
@@ -164,7 +164,7 @@ class WeatherEffectViewModel {
164
164
  _options = null; //天气特效存储参数对象
165
165
  _rainImage = const_image_.RAIN_URL; //雨图片url地址
166
166
  _snowImage = const_image_.SNOW_URL; //雪图片url地址
167
-
167
+ _language = null;
168
168
  constructor(scenceView) {
169
169
  scenceView._viewer.clock.shouldAnimate = true;
170
170
  scenceView._viewer.clock.multiplier = 0.6;
@@ -172,6 +172,7 @@ class WeatherEffectViewModel {
172
172
  this._scene = scenceView._viewer.scene;
173
173
  this._drawManager = scenceView._drawManager;
174
174
  _gravityScratch = new Cesium.Cartesian3();
175
+ this._language = scenceView._language;
175
176
  }
176
177
 
177
178
  applyGravity(particle, dt) {
@@ -194,7 +195,7 @@ class WeatherEffectViewModel {
194
195
  }
195
196
  if (options.gravity) this.setGravity(options.gravity);
196
197
  this._options = options;
197
- this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
198
+ this._drawManager?.startDraw("marker", { image: null }, (feature, { shape }) => {
198
199
  if (!shape.groupName || shape.groupName !== "WeatherEffectDraw") return;
199
200
  if (shape && shape.type === "marker") {
200
201
  let position = shape.position;
@@ -230,14 +231,14 @@ class WeatherEffectViewModel {
230
231
  }
231
232
  }
232
233
  }
233
- that._drawManager && that._drawManager.clearDrawGroup("WeatherEffectDraw");
234
+ that._drawManager?.clearDrawGroup("WeatherEffectDraw");
234
235
  }, "WeatherEffectDraw");
235
236
  }
236
237
 
237
238
  //清除天气特效
238
239
  clear() {
239
- this._drawManager.stopDraw();
240
- this._drawManager && this._drawManager.clearDrawGroup("WeatherEffectDraw");
240
+ this._drawManager?.stopDraw();
241
+ this._drawManager?.clearDrawGroup("WeatherEffectDraw");
241
242
  this._particleSystem && this._scene.primitives.remove(this._particleSystem);
242
243
  this._particleSystem = null;
243
244
  }