@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.
@@ -253,6 +253,7 @@ class ScanEffectViewModel {
253
253
  _drawManager = null; // 绘制对象
254
254
  _lineScan = null;
255
255
  _ringScan = null;
256
+ _language = null;
256
257
  constructor(scenceView, option) {
257
258
  this._viewer = scenceView._viewer;
258
259
  this._options.viewer = this._viewer;
@@ -276,6 +277,7 @@ class ScanEffectViewModel {
276
277
  });
277
278
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
278
279
  this._drawManager = scenceView._drawManager;
280
+ this._language = scenceView._language;
279
281
  }
280
282
  addScaningLine(cartesian) {
281
283
  if (this._options.scanMode == 0) {
@@ -619,7 +621,7 @@ class ScanEffectViewModel {
619
621
  that._options.origin = shape.position;
620
622
  that.addScaningLine(shape.position);
621
623
  }
622
- that._drawManager && that._drawManager.clearDrawGroup("ScanEffectDraw");
624
+ that._drawManager.clearDrawGroup("ScanEffectDraw");
623
625
  }, "ScanEffectDraw");
624
626
  }
625
627
  } else {
@@ -646,7 +648,8 @@ class ScanEffectViewModel {
646
648
  clear() {
647
649
  this.removeScan();
648
650
  this._options.origin = null;
649
- this._drawManager.stopDraw();
651
+ this._drawManager?.clearDrawGroup("ScanEffectDraw");
652
+ this._drawManager?.stopDraw();
650
653
  }
651
654
  // 销毁
652
655
  destroy() {
@@ -399,13 +399,13 @@ class SceneAdvancedToImageViewModel {
399
399
  start() {
400
400
  var that = this;
401
401
  this.clear();
402
- this._drawManager.startDraw("point", { clampToGround: true, image: null }, (feature, { shape }) => {
402
+ this._drawManager?.startDraw("point", { clampToGround: true, image: null }, (feature, { shape }) => {
403
403
  if (!shape.groupName || shape.groupName !== "SceneAdvancedToImageDraw") return;
404
404
  if (shape) {
405
405
  that._options.position = shape.position;
406
406
  that.addSatellitePyramidPrimitive(that._options.position);
407
407
  }
408
- that._drawManager && that._drawManager.clearDrawGroup("SceneAdvancedToImageDraw");
408
+ that._drawManager.clearDrawGroup("SceneAdvancedToImageDraw");
409
409
  }, "SceneAdvancedToImageDraw");
410
410
  }
411
411
  paramsChanged(key, val) {
@@ -437,7 +437,8 @@ class SceneAdvancedToImageViewModel {
437
437
  }
438
438
  //清除全部结果
439
439
  clear() {
440
- this._drawManager.stopDraw();
440
+ this._drawManager?.stopDraw();
441
+ this._drawManager?.clearDrawGroup("SceneAdvancedToImageDraw");
441
442
  if (this._satellitePyramidPrimitive) {
442
443
  this._viewer.scene.primitives.remove(this._satellitePyramidPrimitive);
443
444
  this._satellitePyramidPrimitive = null;