@kq_npm/client3d_webgl_vue 3.6.1-beta → 3.6.3-beta

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/index.js CHANGED
@@ -6461,20 +6461,18 @@ class MeasureViewModel {
6461
6461
  if (this._measureHandler.measureResults) {
6462
6462
  this._measureHandler.measureResults.forEach(measureResult => {
6463
6463
  let labels = measureResult.labels._labels;
6464
+ let positions = measureResult.polyline.positions;
6465
+ let dist = 0; // 更新每段长度值
6464
6466
 
6465
- if (labels.length === 1) {
6466
- if (labels[0].text) labels[0].text = this.convertValueUnit(distanceTotal, unit);
6467
- } else {
6468
- let positions = measureResult.polyline.positions;
6469
- let dist = 0;
6470
-
6471
- for (let i = 0; i < labels.length; i++) {
6472
- if (labels[i].show && labels[i].text && labels[i].text) {
6473
- dist = Cesium.Cartesian3.distance(positions[i], positions[i + 1]);
6474
- labels[i].text = this.convertValueUnit(dist, unit);
6475
- }
6467
+ for (let i = 0; i < labels.length - 1; i++) {
6468
+ if (labels[i].show && labels[i].text) {
6469
+ dist = Cesium.Cartesian3.distance(positions[i], positions[i + 1]);
6470
+ labels[i].text = this.convertValueUnit(dist, unit);
6476
6471
  }
6477
- }
6472
+ } // 更新总长度值
6473
+
6474
+
6475
+ measureResult.label.text = this.convertValueUnit(distanceTotal, unit);
6478
6476
  }, this);
6479
6477
  }
6480
6478
  } //测量距离数值单位换算
@@ -12028,18 +12026,21 @@ class ProfileAnalysisViewModel {
12028
12026
  //显示结果的DOM元素
12029
12027
  //显示结果的DOM元素显隐
12030
12028
  //全局参数对象
12031
- constructor(viewer, viewModel, chart) {
12029
+ constructor(scenceView, viewModel, chart) {
12032
12030
  _defineProperty(this, "_profileAnalysis", null);
12033
12031
 
12034
12032
  _defineProperty(this, "_ProfileAnalysisChart", null);
12035
12033
 
12036
12034
  _defineProperty(this, "_ProfileAnalysisChartVis", null);
12037
12035
 
12036
+ _defineProperty(this, "_language", null);
12037
+
12038
12038
  _defineProperty(this, "_globaOptions", {
12039
12039
  width: 360,
12040
12040
  height: 360
12041
12041
  });
12042
12042
 
12043
+ this._language = scenceView._language;
12043
12044
  this._globaOptions.viewModel = {
12044
12045
  angle: viewModel.perspectiveAngle || 90,
12045
12046
  frustumH: viewModel.targetAreaHeight || 200,
@@ -12047,7 +12048,7 @@ class ProfileAnalysisViewModel {
12047
12048
  isPerspective: viewModel.enablePerspective || true,
12048
12049
  cameraHeight: viewModel.cameraHeight || 0
12049
12050
  };
12050
- this._globaOptions.viewer = viewer;
12051
+ this._globaOptions.viewer = scenceView._viewer;
12051
12052
  this._globaOptions.viewer.scene.postProcessStages._fxaa.enabled = true;
12052
12053
  this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true;
12053
12054
  this._ProfileAnalysisChart = chart;
@@ -12190,14 +12191,14 @@ class ProfileAnalysisViewModel {
12190
12191
  this._globaOptions.ctx.stroke(); //=====================
12191
12192
 
12192
12193
 
12193
- let str = String(this._profileAnalysis._frustumW.toPrecision(7));
12194
- let str1 = "Rect width : " + str;
12195
- str = String(this._profileAnalysis._maxW.toPrecision(7));
12196
- let str2 = "Total width : " + str;
12197
- str = String(this._profileAnalysis._frustumH.toPrecision(7));
12198
- let str3 = "Rect height : " + str;
12199
- str = String(this._profileAnalysis._maxH.toPrecision(7));
12200
- let str4 = "Total height : " + str;
12194
+ let str = String(this._profileAnalysis._frustumW.toFixed(2));
12195
+ let str1 = this._language.profileLength + " : " + str + "m";
12196
+ str = String(this._profileAnalysis._maxW.toFixed(2));
12197
+ let str2 = this._language.totalLength + " : " + str + "m";
12198
+ str = String(this._profileAnalysis._frustumH.toFixed(2));
12199
+ let str3 = this._language.profileHeight + " : " + str + "m";
12200
+ str = String(this._profileAnalysis._maxH.toFixed(2));
12201
+ let str4 = this._language.totalHeight + " : " + str + "m";
12201
12202
  this._globaOptions.ctx.font = "bold 15px Arial";
12202
12203
  this._globaOptions.ctx.textAlign = "left";
12203
12204
  this._globaOptions.ctx.textBaseline = "bottom";
@@ -12391,7 +12392,7 @@ const ProfileAnalysisvue_type_script_setup_true_lang_js_default_ = {
12391
12392
  gis_utils_namespaceObject.utils.getWebMap(null, scenceView => {
12392
12393
  if (scenceView) {
12393
12394
  language.value = scenceView._language;
12394
- viewModel = new ProfileAnalysisViewModel(scenceView._viewer, {
12395
+ viewModel = new ProfileAnalysisViewModel(scenceView, {
12395
12396
  perspectiveAngle: formItem.perspectiveAngle,
12396
12397
  // 透视角度
12397
12398
  targetAreaWidth: formItem.targetAreaWidth,
package/measure/index.js CHANGED
@@ -106,20 +106,18 @@ class MeasureViewModel {
106
106
  if (this._measureHandler.measureResults) {
107
107
  this._measureHandler.measureResults.forEach(measureResult => {
108
108
  let labels = measureResult.labels._labels;
109
+ let positions = measureResult.polyline.positions;
110
+ let dist = 0; // 更新每段长度值
109
111
 
110
- if (labels.length === 1) {
111
- if (labels[0].text) labels[0].text = this.convertValueUnit(distanceTotal, unit);
112
- } else {
113
- let positions = measureResult.polyline.positions;
114
- let dist = 0;
115
-
116
- for (let i = 0; i < labels.length; i++) {
117
- if (labels[i].show && labels[i].text && labels[i].text) {
118
- dist = Cesium.Cartesian3.distance(positions[i], positions[i + 1]);
119
- labels[i].text = this.convertValueUnit(dist, unit);
120
- }
112
+ for (let i = 0; i < labels.length - 1; i++) {
113
+ if (labels[i].show && labels[i].text) {
114
+ dist = Cesium.Cartesian3.distance(positions[i], positions[i + 1]);
115
+ labels[i].text = this.convertValueUnit(dist, unit);
121
116
  }
122
- }
117
+ } // 更新总长度值
118
+
119
+
120
+ measureResult.label.text = this.convertValueUnit(distanceTotal, unit);
123
121
  }, this);
124
122
  }
125
123
  } //测量距离数值单位换算
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"3.6.1-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"9.2.0-beta.36","xlsx":"^0.18.5","css-vars-ponyfill":"^2.4.8","html2canvas":"^1.4.1","xe-utils":"^3.5.4"}}
1
+ {"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"3.6.3-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"9.2.0-beta.36","xlsx":"^0.18.5","css-vars-ponyfill":"^2.4.8","html2canvas":"^1.4.1","xe-utils":"^3.5.4"}}
@@ -20,18 +20,21 @@ class ProfileAnalysisViewModel {
20
20
  //显示结果的DOM元素
21
21
  //显示结果的DOM元素显隐
22
22
  //全局参数对象
23
- constructor(viewer, viewModel, chart) {
23
+ constructor(scenceView, viewModel, chart) {
24
24
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_profileAnalysis", null);
25
25
 
26
26
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChart", null);
27
27
 
28
28
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChartVis", null);
29
29
 
30
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_language", null);
31
+
30
32
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_globaOptions", {
31
33
  width: 360,
32
34
  height: 360
33
35
  });
34
36
 
37
+ this._language = scenceView._language;
35
38
  this._globaOptions.viewModel = {
36
39
  angle: viewModel.perspectiveAngle || 90,
37
40
  frustumH: viewModel.targetAreaHeight || 200,
@@ -39,7 +42,7 @@ class ProfileAnalysisViewModel {
39
42
  isPerspective: viewModel.enablePerspective || true,
40
43
  cameraHeight: viewModel.cameraHeight || 0
41
44
  };
42
- this._globaOptions.viewer = viewer;
45
+ this._globaOptions.viewer = scenceView._viewer;
43
46
  this._globaOptions.viewer.scene.postProcessStages._fxaa.enabled = true;
44
47
  this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true;
45
48
  this._ProfileAnalysisChart = chart;
@@ -182,14 +185,14 @@ class ProfileAnalysisViewModel {
182
185
  this._globaOptions.ctx.stroke(); //=====================
183
186
 
184
187
 
185
- let str = String(this._profileAnalysis._frustumW.toPrecision(7));
186
- let str1 = "Rect width : " + str;
187
- str = String(this._profileAnalysis._maxW.toPrecision(7));
188
- let str2 = "Total width : " + str;
189
- str = String(this._profileAnalysis._frustumH.toPrecision(7));
190
- let str3 = "Rect height : " + str;
191
- str = String(this._profileAnalysis._maxH.toPrecision(7));
192
- let str4 = "Total height : " + str;
188
+ let str = String(this._profileAnalysis._frustumW.toFixed(2));
189
+ let str1 = this._language.profileLength + " : " + str + "m";
190
+ str = String(this._profileAnalysis._maxW.toFixed(2));
191
+ let str2 = this._language.totalLength + " : " + str + "m";
192
+ str = String(this._profileAnalysis._frustumH.toFixed(2));
193
+ let str3 = this._language.profileHeight + " : " + str + "m";
194
+ str = String(this._profileAnalysis._maxH.toFixed(2));
195
+ let str4 = this._language.totalHeight + " : " + str + "m";
193
196
  this._globaOptions.ctx.font = "bold 15px Arial";
194
197
  this._globaOptions.ctx.textAlign = "left";
195
198
  this._globaOptions.ctx.textBaseline = "bottom";
@@ -534,7 +537,7 @@ const __default__ = {
534
537
  gis_utils_.utils.getWebMap(null, scenceView => {
535
538
  if (scenceView) {
536
539
  language.value = scenceView._language;
537
- viewModel = new ProfileAnalysisViewModel/* default */.Z(scenceView._viewer, {
540
+ viewModel = new ProfileAnalysisViewModel/* default */.Z(scenceView, {
538
541
  perspectiveAngle: formItem.perspectiveAngle,
539
542
  // 透视角度
540
543
  targetAreaWidth: formItem.targetAreaWidth,
@@ -13594,20 +13594,18 @@ class MeasureViewModel {
13594
13594
  if (this._measureHandler.measureResults) {
13595
13595
  this._measureHandler.measureResults.forEach(measureResult => {
13596
13596
  let labels = measureResult.labels._labels;
13597
+ let positions = measureResult.polyline.positions;
13598
+ let dist = 0; // 更新每段长度值
13597
13599
 
13598
- if (labels.length === 1) {
13599
- if (labels[0].text) labels[0].text = this.convertValueUnit(distanceTotal, unit);
13600
- } else {
13601
- let positions = measureResult.polyline.positions;
13602
- let dist = 0;
13603
-
13604
- for (let i = 0; i < labels.length; i++) {
13605
- if (labels[i].show && labels[i].text && labels[i].text) {
13606
- dist = Cesium.Cartesian3.distance(positions[i], positions[i + 1]);
13607
- labels[i].text = this.convertValueUnit(dist, unit);
13608
- }
13600
+ for (let i = 0; i < labels.length - 1; i++) {
13601
+ if (labels[i].show && labels[i].text) {
13602
+ dist = Cesium.Cartesian3.distance(positions[i], positions[i + 1]);
13603
+ labels[i].text = this.convertValueUnit(dist, unit);
13609
13604
  }
13610
- }
13605
+ } // 更新总长度值
13606
+
13607
+
13608
+ measureResult.label.text = this.convertValueUnit(distanceTotal, unit);
13611
13609
  }, this);
13612
13610
  }
13613
13611
  } //测量距离数值单位换算
@@ -16722,18 +16720,21 @@ class ProfileAnalysisViewModel {
16722
16720
  //显示结果的DOM元素
16723
16721
  //显示结果的DOM元素显隐
16724
16722
  //全局参数对象
16725
- constructor(viewer, viewModel, chart) {
16723
+ constructor(scenceView, viewModel, chart) {
16726
16724
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_profileAnalysis", null);
16727
16725
 
16728
16726
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChart", null);
16729
16727
 
16730
16728
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChartVis", null);
16731
16729
 
16730
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_language", null);
16731
+
16732
16732
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_globaOptions", {
16733
16733
  width: 360,
16734
16734
  height: 360
16735
16735
  });
16736
16736
 
16737
+ this._language = scenceView._language;
16737
16738
  this._globaOptions.viewModel = {
16738
16739
  angle: viewModel.perspectiveAngle || 90,
16739
16740
  frustumH: viewModel.targetAreaHeight || 200,
@@ -16741,7 +16742,7 @@ class ProfileAnalysisViewModel {
16741
16742
  isPerspective: viewModel.enablePerspective || true,
16742
16743
  cameraHeight: viewModel.cameraHeight || 0
16743
16744
  };
16744
- this._globaOptions.viewer = viewer;
16745
+ this._globaOptions.viewer = scenceView._viewer;
16745
16746
  this._globaOptions.viewer.scene.postProcessStages._fxaa.enabled = true;
16746
16747
  this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true;
16747
16748
  this._ProfileAnalysisChart = chart;
@@ -16884,14 +16885,14 @@ class ProfileAnalysisViewModel {
16884
16885
  this._globaOptions.ctx.stroke(); //=====================
16885
16886
 
16886
16887
 
16887
- let str = String(this._profileAnalysis._frustumW.toPrecision(7));
16888
- let str1 = "Rect width : " + str;
16889
- str = String(this._profileAnalysis._maxW.toPrecision(7));
16890
- let str2 = "Total width : " + str;
16891
- str = String(this._profileAnalysis._frustumH.toPrecision(7));
16892
- let str3 = "Rect height : " + str;
16893
- str = String(this._profileAnalysis._maxH.toPrecision(7));
16894
- let str4 = "Total height : " + str;
16888
+ let str = String(this._profileAnalysis._frustumW.toFixed(2));
16889
+ let str1 = this._language.profileLength + " : " + str + "m";
16890
+ str = String(this._profileAnalysis._maxW.toFixed(2));
16891
+ let str2 = this._language.totalLength + " : " + str + "m";
16892
+ str = String(this._profileAnalysis._frustumH.toFixed(2));
16893
+ let str3 = this._language.profileHeight + " : " + str + "m";
16894
+ str = String(this._profileAnalysis._maxH.toFixed(2));
16895
+ let str4 = this._language.totalHeight + " : " + str + "m";
16895
16896
  this._globaOptions.ctx.font = "bold 15px Arial";
16896
16897
  this._globaOptions.ctx.textAlign = "left";
16897
16898
  this._globaOptions.ctx.textBaseline = "bottom";
@@ -17109,7 +17110,7 @@ const __default__ = {
17109
17110
  gis_utils_.utils.getWebMap(null, scenceView => {
17110
17111
  if (scenceView) {
17111
17112
  language.value = scenceView._language;
17112
- viewModel = new ProfileAnalysisViewModel/* default */.Z(scenceView._viewer, {
17113
+ viewModel = new ProfileAnalysisViewModel/* default */.Z(scenceView, {
17113
17114
  perspectiveAngle: formItem.perspectiveAngle,
17114
17115
  // 透视角度
17115
17116
  targetAreaWidth: formItem.targetAreaWidth,