@kq_npm/client3d_webgl_vue 4.5.37 → 4.5.38

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.
package/adddata/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  (function webpackUniversalModuleDefinition(root, factory) {
2
2
  if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/const-image"), require("papaparse"));
3
+ module.exports = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/const-image"));
4
4
  else if(typeof define === 'function' && define.amd)
5
- define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/const-image", "papaparse"], factory);
5
+ define("@kq_npm/client3d_webgl_vue", ["vue", "@kq_npm/client_common_vue/_utils/gis-utils", "@kq_npm/client_common_vue/_utils/webmapservice", "@kq_npm/client_common_vue/_utils/util", "@kq_npm/client_common_vue/init.js", "@kq_npm/client_common_vue/_utils/const-image"], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/const-image"), require("papaparse"));
7
+ exports["@kq_npm/client3d_webgl_vue"] = factory(require("vue"), require("@kq_npm/client_common_vue/_utils/gis-utils"), require("@kq_npm/client_common_vue/_utils/webmapservice"), require("@kq_npm/client_common_vue/_utils/util"), require("@kq_npm/client_common_vue/init.js"), require("@kq_npm/client_common_vue/_utils/const-image"));
8
8
  else
9
- root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/const-image"], root["_"]);
10
- })(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__3217__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__7997__, __WEBPACK_EXTERNAL_MODULE__6277__, __WEBPACK_EXTERNAL_MODULE__7747__) {
9
+ root["@kq_npm/client3d_webgl_vue"] = factory(root["Vue"], root["@kq_npm/client_common_vue/_utils/gis-utils"], root["@kq_npm/client_common_vue/_utils/webmapservice"], root["@kq_npm/client_common_vue/_utils/util"], root["@kq_npm/client_common_vue/init.js"], root["@kq_npm/client_common_vue/_utils/const-image"]);
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__1895__, __WEBPACK_EXTERNAL_MODULE__7135__, __WEBPACK_EXTERNAL_MODULE__3217__, __WEBPACK_EXTERNAL_MODULE__3458__, __WEBPACK_EXTERNAL_MODULE__7997__, __WEBPACK_EXTERNAL_MODULE__6277__) {
11
11
  return /******/ (function() { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ({
@@ -105,13 +105,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__7997__;
105
105
 
106
106
  module.exports = __WEBPACK_EXTERNAL_MODULE__1895__;
107
107
 
108
- /***/ }),
109
-
110
- /***/ 7747:
111
- /***/ (function(module) {
112
-
113
- module.exports = __WEBPACK_EXTERNAL_MODULE__7747__;
114
-
115
108
  /***/ })
116
109
 
117
110
  /******/ });
@@ -211,9 +204,9 @@ var util_ = __webpack_require__(3458);
211
204
  var message = __webpack_require__(1705);
212
205
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/const-image"
213
206
  var const_image_ = __webpack_require__(6277);
214
- // EXTERNAL MODULE: external {"root":"_","commonjs":"papaparse","commonjs2":"papaparse","amd":"papaparse"}
215
- var external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_ = __webpack_require__(7747);
216
- var external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_);
207
+ ;// CONCATENATED MODULE: external "papaparse"
208
+ var external_papaparse_namespaceObject = require("papaparse");
209
+ var external_papaparse_default = /*#__PURE__*/__webpack_require__.n(external_papaparse_namespaceObject);
217
210
  ;// CONCATENATED MODULE: ./src/webgl/adddata/AddDataViewModel.js
218
211
  /*
219
212
  * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
@@ -361,7 +354,7 @@ class AddDataViewModel {
361
354
  });
362
355
  } else if (ext === "csv") {
363
356
  (0,util_.readFile)(file, res => {
364
- var features = external_root_commonjs_papaparse_commonjs2_papaparse_amd_papaparse_default().parse(res, {
357
+ var features = external_papaparse_default().parse(res, {
365
358
  skipEmptyLines: true,
366
359
  header: true
367
360
  }).data;
package/boxclip/index.js CHANGED
@@ -179,6 +179,7 @@ var message = __webpack_require__(1705);
179
179
  */
180
180
  //Box裁剪逻辑类
181
181
 
182
+
182
183
  class BoxClipViewModel {
183
184
  _viewer = null; //三维viewer对象
184
185
  _options = {}; //Box裁剪存储参数对象
@@ -205,13 +206,14 @@ class BoxClipViewModel {
205
206
  _drawManager = null; //绘制管理对象
206
207
  _removeEventListener = null; //绘制完成监听事件
207
208
  _language = {};
208
- constructor(scenceView, options) {
209
+ callbackParams = null;
210
+ constructor(scenceView, options, callbackParams) {
209
211
  this._language = scenceView._language;
210
212
  this._options = Object.assign({}, options, this._defaultOptions);
211
213
  this._viewer = scenceView._viewer;
214
+ this.callbackParams = callbackParams;
212
215
  // this._viewer.enabledFXAA = true;
213
216
  this._options.viewer = this._viewer;
214
-
215
217
  this._drawManager = scenceView._drawManager;
216
218
  let that = this;
217
219
  this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
@@ -222,14 +224,25 @@ class BoxClipViewModel {
222
224
  that._drawManager.clear();
223
225
  }
224
226
  });
227
+ // 事件绑定this
228
+ this._resetListData = this._resetListData.bind(this);
229
+ // 添加图层数据源变化监听
230
+ gis_utils_.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
231
+ }
232
+ _resetListData(e) {
233
+ // 如果图层变化事件是自己触发的 则不继续执行 避免死循环
234
+ if (e.eventTarget && e.eventTarget === this) {
235
+ return;
236
+ }
237
+ this.callbackParams && this.callbackParams("setData")
225
238
  }
226
-
227
239
  // 查找所有3dtiles模型对象
228
240
  findLayers() {
229
241
  let tilesets = [];
230
242
  const primitives = this._options.viewer.scene.primitives._primitives;
231
243
  for (let m = 0; m < primitives.length; m++) {
232
244
  if (primitives[m] instanceof Cesium.Cesium3DTileset) {
245
+ if(!primitives[m].show) continue;
233
246
  tilesets.push({
234
247
  guid: primitives[m].guid,
235
248
  name: primitives[m].name ? primitives[m].name : primitives[m].guid
@@ -254,7 +267,7 @@ class BoxClipViewModel {
254
267
  var flag = false;
255
268
  var models = this._options.viewer.scene.primitives._primitives;
256
269
  for (let i = 0; i < models.length; i++) {
257
- if (models[i]._url) {
270
+ if (models[i]._url && models[i].show) {
258
271
  flag = true;
259
272
  }
260
273
  }
@@ -285,6 +298,7 @@ class BoxClipViewModel {
285
298
  //移除监听事件
286
299
  this._removeEventListener && this._removeEventListener();
287
300
  this._removeEventListener = null;
301
+ gis_utils_.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
288
302
  }
289
303
 
290
304
  // 设置裁剪对象
@@ -498,20 +512,23 @@ headerTempTitle.value = language.value.boxClip;
498
512
  axisZ: formItem.clipHeight,
499
513
  angle: formItem.clipRotation
500
514
  };
501
- viewModel = new BoxClipViewModel(scenceView, options);
515
+ viewModel = new BoxClipViewModel(scenceView, options, callbackParams);
502
516
  }
503
517
  });
504
518
  setTimeout(() => {
505
- if (viewModel) {
506
- tiles.value = viewModel.findLayers(); // 获取所有tileset对象
507
- if (tiles.value.length > 0) {
508
- formItem.tileset = tiles.value[0].guid;
509
- paramsChanged("tileset");
510
- }
511
- }
519
+ callbackParams();
512
520
  }, 1000);
513
521
  });
514
-
522
+ function callbackParams (key, val) {
523
+ if (viewModel) {
524
+ tiles.value = viewModel.findLayers(); // 获取所有tileset对象
525
+ formItem.tileset = "";
526
+ if (tiles.value.length > 0) {
527
+ formItem.tileset = tiles.value[0].guid;
528
+ }
529
+ paramsChanged("tileset");
530
+ }
531
+ }
515
532
  /**
516
533
  * @description 监听header生成
517
534
  */