@kq_npm/client3d_webgl_vue 4.5.40 → 4.5.42

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/flight/index.js CHANGED
@@ -65,32 +65,47 @@ _common_KqGIS__WEBPACK_IMPORTED_MODULE_1__/* .kq_npm_client_common_vue.KqMessage
65
65
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
66
66
  /* harmony export */ "Z": function() { return /* binding */ FlightViewModel; }
67
67
  /* harmony export */ });
68
- /*
69
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
70
- * All rights reserved.
71
- */
68
+ /*
69
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
70
+ * All rights reserved.
71
+ */
72
72
  //飞行操作类
73
73
  class FlightViewModel {
74
74
  _animationPath = null; //飞行三维对象
75
75
  stopEvent = null; //停止事件
76
+ _currentKey = -1;
77
+ _isPause = false;
76
78
 
77
79
  constructor(viewer) {
78
80
  this._animationPath = new Cesium.Kq3dAnimationPath(viewer);
79
81
  this.stopEvent = this._animationPath.stoped;
82
+ this.stopEvent.addEventListener(()=> {
83
+ this._isPause = false;
84
+ });
80
85
  }
81
86
 
82
87
  //播放动画导航路径
83
88
  play() {
89
+ if(!this._isPause) {
90
+ this._animationPath.currentKey = this._currentKey;
91
+ let keyPoint = this._animationPath.getKeyPoint(this._currentKey + 1);
92
+ this._animationPath.viewer.camera.setView({
93
+ destination: keyPoint.position,
94
+ orientation: keyPoint.orientation
95
+ });
96
+ }
84
97
  this._animationPath.play();
85
98
  }
86
99
 
87
100
  //暂停动画导航路径
88
101
  pause() {
102
+ this._isPause = true;
89
103
  this._animationPath.pause();
90
104
  }
91
105
 
92
106
  //停止动画导航路径
93
107
  stop() {
108
+ this._isPause = false;
94
109
  this._animationPath.stop();
95
110
  }
96
111
 
@@ -119,6 +134,17 @@ class FlightViewModel {
119
134
  return this._animationPath.getKeyPoint(index);
120
135
  }
121
136
 
137
+ //定位到关键帧
138
+ locationKey(index) {
139
+ this.stop();
140
+ this._currentKey = index - 1;
141
+ let keyPoint = this._animationPath.getKeyPoint(index);
142
+ this._animationPath.viewer.camera.setView({
143
+ destination: keyPoint.position,
144
+ orientation: keyPoint.orientation
145
+ });
146
+ }
147
+
122
148
  //获取指定索引位置的路径节点的耗时信息
123
149
  getKeyPointDur(index) {
124
150
  return this._animationPath.getKeyPointDur(index);
@@ -141,6 +167,7 @@ class FlightViewModel {
141
167
 
142
168
  //清空动画导航所有路径节点
143
169
  clearKeyPoints() {
170
+ this._currentKey = -1;
144
171
  this._animationPath.clearKeyPoints();
145
172
  }
146
173
 
@@ -151,6 +178,7 @@ class FlightViewModel {
151
178
 
152
179
  //动画导航转换成xml字符串
153
180
  asXmlString() {
181
+ this._currentKey = -1;
154
182
  return this._animationPath.asXmlString();
155
183
  }
156
184
 
@@ -639,6 +667,11 @@ function hideDropDownMenu() {
639
667
  showMoreMenu.value = false;
640
668
  }
641
669
 
670
+ // 定位到关键帧
671
+ function locationKey(index) {
672
+ viewModel.locationKey(index);
673
+ }
674
+
642
675
  //添加关键帧
643
676
  function addKey() {
644
677
  var duration = 5;
@@ -1059,7 +1092,8 @@ return (_ctx, _cache) => {
1059
1092
  border: "",
1060
1093
  data: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(tableData),
1061
1094
  "header-cell-style": (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(headClass),
1062
- style: {"height":"200px"}
1095
+ style: {"height":"200px"},
1096
+ "highlight-current-row": ""
1063
1097
  }, {
1064
1098
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
1065
1099
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_table_column, {
@@ -1091,10 +1125,24 @@ return (_ctx, _cache) => {
1091
1125
  }, 8 /* PROPS */, ["label"]),
1092
1126
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_table_column, {
1093
1127
  label: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).operation,
1094
- width: "90",
1128
+ width: "130",
1095
1129
  align: "center"
1096
1130
  }, {
1097
1131
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)((scope) => [
1132
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
1133
+ onClick: $event => (locationKey(scope.$index)),
1134
+ title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).location
1135
+ }, {
1136
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
1137
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, { size: 16 }, {
1138
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
1139
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(icons_vue_.MapLocation))
1140
+ ]),
1141
+ _: 1 /* STABLE */
1142
+ })
1143
+ ]),
1144
+ _: 2 /* DYNAMIC */
1145
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "title"]),
1098
1146
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
1099
1147
  onClick: $event => (replaceKey(scope.$index, scope.row)),
1100
1148
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).replaceKeyframe
@@ -1 +1 @@
1
- .kq-flight3d{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq-flight3d .kq-flight3d-box{width:466px}.kq-flight3d p{margin:0}.kq-flight3d .kq-flight3d-btns{display:-webkit-box;display:-ms-flexbox;display:flex}.kq-flight3d .kq-flight3d-btns .kq-button{width:48px;height:48px;margin-right:12px}.kq-flight3d .kq-flight3d-btns .kq-button .kq-icon{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul{color:var(--kq-text-color-regular);height:100%;margin-top:0;margin-bottom:0;border-right:none}.kq-flight3d .pathlist-ul .kq-icon{color:var(--kq-text-color-regular);cursor:pointer}.kq-flight3d .pathlist-ul .kq-icon-light{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul li{position:relative;height:32px;line-height:32px;list-style-type:none;border-bottom:var(--kq-border-width) var(--kq-border-style) var(--kq-border-color);padding:0!important;cursor:unset}.kq-flight3d .pathlist-ul li span{text-indent:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.kq-flight3d .dropdown-ul{width:84px;background-color:var(--kq-bg-color);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:var(--kq-box-shadow);box-shadow:var(--kq-box-shadow);text-align:center;position:fixed;z-index:9999999;border-right:none;padding:8px 0}.kq-flight3d .dropdown-ul .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .dropdown-ul li{height:30px;padding-left:12px!important}.kq-flight3d .kq-flight3d-list-title{line-height:24px;margin:8px 0;text-align:center}.kq-flight3d .kq-flight3d-add-title,.kq-flight3d .kq-flight3d-list-title{color:var(--kq-text-color-primary);background:var(--kq-fill-color-light);font-size:16px;padding:12px 16px;font-weight:700}.kq-flight3d .kq-flight3d-add-title .kq-button{height:22px;padding:0 12px 0 0}.kq-flight3d .kq-flight3d-add-title .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .kq-flight3d-item-name{color:var(--kq-text-color-regular);margin:8px 0}.kq-flight3d .kq-table .cell{padding:0 8px}.kq-flight3d .kq-table .kq-button{width:32px;height:32px}.kq-flight3d .kq-table .kq-button+.kq-button{margin-left:8px}.kq-flight3d .kq-table .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .kq-flight3d-btn-add{margin:8px 0;width:100%;color:var(--kq-color-primary)}.kq-flight3d .kq-flight3d-btn-add .kq-icon{color:var(--kq-text-color-regular);margin-right:10px}.kq-flight3d .kq-flight3d-ybf{color:var(--kq-text-color-regular);background:var(--kq-fill-color-light);font-size:var(--kq-font-size-base);line-height:32px;padding:12px 16px;margin-bottom:8px!important}.kq-flight3d .kq-flight3d-ybf .kq-form-item__content{height:32px}.kq-flight3d .kq-flight3d-ybf .kq-form-item__content div{width:100%;text-align:center}.kq-flight3d .kq-flight3d-ybf .kq-icon{color:var(--kq-text-color-regular);margin:0 12px;cursor:pointer}.kq-flight3d .kq-divider{margin:0 0 16px}
1
+ .kq-flight3d{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq-flight3d .kq-flight3d-box{width:506px}.kq-flight3d p{margin:0}.kq-flight3d .kq-flight3d-btns{display:-webkit-box;display:-ms-flexbox;display:flex}.kq-flight3d .kq-flight3d-btns .kq-button{width:48px;height:48px;margin-right:12px}.kq-flight3d .kq-flight3d-btns .kq-button .kq-icon{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul{color:var(--kq-text-color-regular);height:100%;margin-top:0;margin-bottom:0;border-right:none}.kq-flight3d .pathlist-ul .kq-icon{color:var(--kq-text-color-regular);cursor:pointer}.kq-flight3d .pathlist-ul .kq-icon-light{color:var(--kq-color-primary)}.kq-flight3d .pathlist-ul li{position:relative;height:32px;line-height:32px;list-style-type:none;border-bottom:var(--kq-border-width) var(--kq-border-style) var(--kq-border-color);padding:0!important;cursor:unset}.kq-flight3d .pathlist-ul li span{text-indent:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.kq-flight3d .dropdown-ul{width:84px;background-color:var(--kq-bg-color);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:var(--kq-box-shadow);box-shadow:var(--kq-box-shadow);text-align:center;position:fixed;z-index:9999999;border-right:none;padding:8px 0}.kq-flight3d .dropdown-ul .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .dropdown-ul li{height:30px;padding-left:12px!important}.kq-flight3d .kq-flight3d-list-title{line-height:24px;margin:8px 0;text-align:center}.kq-flight3d .kq-flight3d-add-title,.kq-flight3d .kq-flight3d-list-title{color:var(--kq-text-color-primary);background:var(--kq-fill-color-light);font-size:16px;padding:12px 16px;font-weight:700}.kq-flight3d .kq-flight3d-add-title .kq-button{height:22px;padding:0 12px 0 0}.kq-flight3d .kq-flight3d-add-title .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .kq-flight3d-item-name{color:var(--kq-text-color-regular);margin:8px 0}.kq-flight3d .kq-table .cell{padding:0 8px}.kq-flight3d .kq-table .kq-button{width:32px;height:32px}.kq-flight3d .kq-table .kq-button+.kq-button{margin-left:8px}.kq-flight3d .kq-table .kq-icon{color:var(--kq-text-color-regular)}.kq-flight3d .kq-flight3d-btn-add{margin:8px 0;width:100%;color:var(--kq-color-primary)}.kq-flight3d .kq-flight3d-btn-add .kq-icon{color:var(--kq-text-color-regular);margin-right:10px}.kq-flight3d .kq-flight3d-ybf{color:var(--kq-text-color-regular);background:var(--kq-fill-color-light);font-size:var(--kq-font-size-base);line-height:32px;padding:12px 16px;margin-bottom:8px!important}.kq-flight3d .kq-flight3d-ybf .kq-form-item__content{height:32px}.kq-flight3d .kq-flight3d-ybf .kq-form-item__content div{width:100%;text-align:center}.kq-flight3d .kq-flight3d-ybf .kq-icon{color:var(--kq-text-color-regular);margin:0 12px;cursor:pointer}.kq-flight3d .kq-divider{margin:0 0 16px}