cesium-pocket 0.3.1-alpha → 0.3.2-alpha

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.
@@ -25,8 +25,8 @@ const h = {
25
25
  //可拖拽
26
26
  };
27
27
  class G {
28
- constructor(e) {
29
- this.status = h.STOPED, this.editStatus = o.DRAG_UNABLED, this.delStatus = p.DEL_UNABLED, this.viewer = e;
28
+ constructor(i) {
29
+ this.status = h.STOPED, this.editStatus = o.DRAG_UNABLED, this.delStatus = p.DEL_UNABLED, this.viewer = i;
30
30
  }
31
31
  getStatus() {
32
32
  return this.status;
@@ -84,8 +84,8 @@ class G {
84
84
  }
85
85
  const U = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAQAElEQVR4AexdfYwkR3V/r3dnb884wUd03O1HTrZj4p09/CFMSBwpkqX8Ayjkj6ALQY6ixHIc8REJRUoiJUK+80eI7QQH28IOR+xIxOGwyCVRIHEE2JgD6cAfCPt2d9b4ZMt3O7uAfUYceG9ndrp4r6d1N7eeme7prq7q6np7VdvdVa/e+73f699M983OTADyIwwIAwMZEIEMpEYmhAEAEYicBcLAEAZEIEPIkSlhQAQi54AwMISBAgUyJKpMCQOOMCACcaRQAtMOAyIQO7xLVEcYEIE4UiiBaYcBEYgd3iWqIwy4KRBHyBWY7jMgAnG/hpJBgQyIQAokV1y7z4AIxP0aSgYFMiACKZBcce0+AyKQLTWUQ2GglwERSC8bsi8MbGFABLKFEDkUBnoZEIH0siH7wsAWBkQgWwiRQ2GglwERSC8bxe6LdwcZEIE4WDSBbI4BEYgBrmfV7PbZjcuvnNqY+73pdv2vplv1g1Ot+uO0fZL6IvWXqZ+ivhF33ucxnnsytj3Ia9kH+2KfBqB7H0IEUsApsOvM2y6d2Zj//Zl2/W464b8btn/h9RCD7yHif4CCOyjkjQhwHQC8k3qd+i9T30F9Iu68z2M8987Y9kZeyz7YF/tk3xyDY3FMWitNMwMiEE2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DsYxyjKv/d+RSAFnwJjtXA/3bDr/3JQhFcj3wXj9929CKTgM+AELjdVAe8+ZJ/sOw98WZvMgAgkmaPcFquTS3eTk6PUdbWjsU9d/sTPAAZEIAOI0T2swkDbDbtOX7rzrJo/EYihiq5OLjwKoB7KH0491PWV35N4SGZABJLMkT6LWrCfnOX5ctDT0PVBbqSZYCAwEURidBlo4uLL9D9at3aPMvxGuDXykWGp4SWVCScCMVzKZm2Jv4znqQxhn4rXZlgqS7IyIALJylyOdRiqkW/Ys6zJAVGWxgyIQGIiTG5WJhtfQoDPpY3Jtrwmrb3Y6WNABKKPy5E8BeEYP4uk+XLQM7HtSP7FWA8DIhA9PI7s5cTkseMKVeK7D9mGbUcOUNkFZhMTgZjl+7xoq7XGJ0Cp75032HtAc5FN75jsG2VABGKU7n7BkF8b6TdBY8PmaFpa4QyIQAqneHiA5ral/yKLz1Pf2j4fz20dl2ODDIhADJI9MFQY8g17p2e+A92xniHZtcGACMQG61tiNieXlxGBRRLN8D6PRQfyyxwDfSKJQPqQYmNopbbEf4KyQLEX4n3alWabARGI7Qr0xMcg2M+9Z0h2LTMQWI4v4XsYWBlf+CL3niHZtcyACMRyASR8uRkQgZS7PoLOMgO6BGI5DQkvDBTDgAikGF7Fa0UYEIFUpJCSRjEMiECK4VW8VoQBEUhFCilpFMOAAwIpJnHxKgykYUAEkoYlsfGWARGIt6WXxNMwIAJJw5LYeMuACMTb0kviaRjwWyBpGBIbrxkQgXhdfkk+iQERSBJDMu81AyIQr8svyScxIAJJYkjmvWZABFJQ+cVtNRj4OQAAAP//gm46zwAAAAZJREFUAwB1f5TcL2bFTAAAAABJRU5ErkJggg==";
86
86
  class L extends G {
87
- constructor(e) {
88
- super(e), this.mainData = [], this.dataSource = new C("drawerDataSource"), this.currentDragPoint = null, this.currentIndex = -1, this.delCallbackFun = this.delCallback, this.viewer.dataSources.add(this.dataSource);
87
+ constructor(i) {
88
+ super(i), this.mainData = [], this.dataSource = new C("drawerDataSource"), this.currentDragPoint = null, this.currentIndex = -1, this.delCallbackFun = this.delCallback, this.viewer.dataSources.add(this.dataSource);
89
89
  }
90
90
  /**
91
91
  * 获取DataSource
@@ -99,42 +99,42 @@ class L extends G {
99
99
  * @returns Cartesian3[]
100
100
  */
101
101
  refreshPositionsData() {
102
- return this.mainData = [], this.dataSource.entities.values.forEach((e) => {
102
+ return this.mainData = [], this.dataSource.entities.values.forEach((i) => {
103
103
  var t;
104
- const i = new r();
105
- (t = e.position) == null || t.getValue(I.now(), i), this.mainData.push(i);
104
+ const e = new r();
105
+ (t = i.position) == null || t.getValue(I.now(), e), this.mainData.push(e);
106
106
  }), this.mainData;
107
107
  }
108
108
  clearAllData() {
109
109
  this.mainData = [], this.currentDragPoint = null, this.currentIndex = -1, this.dataSource && this.viewer.dataSources.remove(this.dataSource, !0), super.stopStatus();
110
110
  }
111
111
  getEntityIndex() {
112
- var e;
113
- for (let i = 0, t = this.dataSource.entities.values.length; i < t; i++)
114
- if (this.dataSource.entities.values[i].id == ((e = this.currentDragPoint) == null ? void 0 : e.id)) {
115
- this.currentIndex = i;
112
+ var i;
113
+ for (let e = 0, t = this.dataSource.entities.values.length; e < t; e++)
114
+ if (this.dataSource.entities.values[e].id == ((i = this.currentDragPoint) == null ? void 0 : i.id)) {
115
+ this.currentIndex = e;
116
116
  break;
117
117
  }
118
118
  }
119
- editMoveFun(e, i) {
119
+ editMoveFun(i, e) {
120
120
  if (o.DRAG_UNABLED == super.getEditStatus()) {
121
- const t = this.viewer.scene.pick(e.endPosition);
121
+ const t = this.viewer.scene.pick(i.endPosition);
122
122
  if (l(t) && l(t.id) && this.dataSource.entities.contains(d(t.id))) {
123
123
  let a = d(t.id);
124
124
  this.currentDragPoint = a, this.editDragEnable();
125
125
  }
126
- } else o.DRAGING == super.getEditStatus() ? this.currentDragPoint && (this.currentDragPoint.position = new E(i), this.mainData[this.currentIndex] = i) : this.editDragUnable();
126
+ } else o.DRAGING == super.getEditStatus() ? this.currentDragPoint && (this.currentDragPoint.position = new E(e), this.mainData[this.currentIndex] = e) : this.editDragUnable();
127
127
  }
128
- deleteMoveFun(e) {
128
+ deleteMoveFun(i) {
129
129
  if (p.DEL_UNABLED == super.getDelStatus()) {
130
- const i = this.viewer.scene.pick(e.endPosition);
131
- l(i) && l(i.id) && this.dataSource.entities.contains(d(i.id)) && this.delEnable();
130
+ const e = this.viewer.scene.pick(i.endPosition);
131
+ l(e) && l(e.id) && this.dataSource.entities.contains(d(e.id)) && this.delEnable();
132
132
  } else
133
133
  this.delUnable();
134
134
  }
135
- addPoint(e) {
136
- let i = null;
137
- return this.point ? i = this.point : i = {
135
+ addPoint(i) {
136
+ let e = null;
137
+ return this.point ? e = this.point : e = {
138
138
  pixelSize: 6,
139
139
  color: u.TRANSPARENT,
140
140
  outlineColor: u.YELLOW,
@@ -142,8 +142,8 @@ class L extends G {
142
142
  heightReference: S.CLAMP_TO_GROUND
143
143
  //贴地
144
144
  }, this.dataSource.entities.add({
145
- position: e,
146
- point: i,
145
+ position: i,
146
+ point: e,
147
147
  properties: {
148
148
  entityType: "POINT"
149
149
  },
@@ -151,21 +151,21 @@ class L extends G {
151
151
  });
152
152
  }
153
153
  //在删除状态下,删除节点
154
- deletePoint(e) {
155
- this.delCallbackFun && this.delCallbackFun().then((i) => {
156
- i && (this.dataSource.entities.remove(e), this.refreshPositionsData());
154
+ deletePoint(i) {
155
+ this.delCallbackFun && this.delCallbackFun().then((e) => {
156
+ e && (this.dataSource.entities.remove(i), this.refreshPositionsData());
157
157
  });
158
158
  }
159
159
  delCallback() {
160
- return new Promise((e) => {
161
- const i = confirm("确定删除吗?");
162
- e(!!i);
160
+ return new Promise((i) => {
161
+ const e = confirm("确定删除吗?");
162
+ console.log(e), i(!!e);
163
163
  });
164
164
  }
165
165
  }
166
166
  class T extends L {
167
- constructor(e, i = null) {
168
- super(e), this.handler = null, this.pointCollection = new B(), this.billboardCallbackFun = this.addBillboardCallback, this.point_L_ClickEvent = () => {
167
+ constructor(i, e = null) {
168
+ super(i), this.handler = null, this.pointCollection = new B(), this.billboardCallbackFun = this.addBillboardCallback, this.point_L_ClickEvent = () => {
169
169
  var t;
170
170
  (t = this.handler) == null || t.setInputAction((a) => {
171
171
  if (h.DRAWABLE == super.getStatus()) {
@@ -191,7 +191,7 @@ class T extends L {
191
191
  var t;
192
192
  (t = this.handler) == null || t.setInputAction((a) => {
193
193
  if (o.DRAGING == super.getEditStatus()) {
194
- const s = this.viewer.scene.pickPosition(a.endPosition);
194
+ const s = this.viewer.scene.pickPosition(a.position);
195
195
  l(s) && this.editCallbackFun && this.editCallbackFun(s), this.editDragUnable(), this.currentDragPoint = null, this.viewer.scene.screenSpaceCameraController.enableRotate = !0;
196
196
  }
197
197
  }, c.LEFT_UP);
@@ -217,7 +217,7 @@ class T extends L {
217
217
  } else
218
218
  this.delUnable();
219
219
  }, c.MOUSE_MOVE);
220
- }, i && (this.billboardCallbackFun = i.billboardCallbackFun ? i.billboardCallbackFun : this.addBillboardCallback, this.delCallbackFun = i.delCallbackFun ? i.delCallbackFun : this.delCallback, i.editCallbackFun && (this.editCallbackFun = i.editCallbackFun));
220
+ }, e && (this.billboardCallbackFun = e.billboardCallbackFun ? e.billboardCallbackFun : this.addBillboardCallback, this.delCallbackFun = e.delCallbackFun ? e.delCallbackFun : this.delCallback, e.editCallbackFun && (this.editCallbackFun = e.editCallbackFun));
221
221
  }
222
222
  start() {
223
223
  super.drawableStatus(), this.handler || (this.handler = new w(this.viewer.scene.canvas)), this.point_L_ClickEvent(), this.point_L_DownEvent(), this.point_L_UpEvent(), this.point_moveEvent();
@@ -226,18 +226,18 @@ class T extends L {
226
226
  return this.pointCollection;
227
227
  }
228
228
  clearAll() {
229
- var e;
229
+ var i;
230
230
  this.clearAllData(), this.billboardCallbackFun = this.addBillboardCallback;
231
- for (let i = 0, t = this.pointCollection.values.length; i < t; i++) {
232
- const a = this.pointCollection.values[i];
231
+ for (let e = 0, t = this.pointCollection.values.length; e < t; e++) {
232
+ const a = this.pointCollection.values[e];
233
233
  this.viewer.entities.removeById(a.id);
234
234
  }
235
- (e = this.handler) == null || e.destroy();
235
+ (i = this.handler) == null || i.destroy();
236
236
  }
237
- addBillboardCallback(e) {
237
+ addBillboardCallback(i) {
238
238
  return this.viewer.entities.add({
239
239
  // 设置经纬度位置 (经度, 纬度, 海拔高度)
240
- position: e,
240
+ position: i,
241
241
  billboard: {
242
242
  image: U,
243
243
  // 设置图片显示的宽度和高度 (像素)
@@ -252,10 +252,10 @@ class T extends L {
252
252
  show: !0
253
253
  });
254
254
  }
255
- deleteBillboard(e) {
256
- this.delCallbackFun ? this.delCallbackFun().then((i) => {
257
- i && (this.dataSource.entities.remove(e), this.refreshPositionsData());
258
- }) : confirm("确定要删除吗?") && (this.viewer.entities.remove(e), this.refreshPositionsData());
255
+ deleteBillboard(i) {
256
+ this.delCallbackFun ? this.delCallbackFun().then((e) => {
257
+ e && (this.viewer.entities.remove(i), this.refreshPositionsData());
258
+ }) : confirm("确定要删除吗?") && (this.viewer.entities.remove(i), this.refreshPositionsData());
259
259
  }
260
260
  }
261
261
  const f = {
@@ -265,8 +265,8 @@ const f = {
265
265
  //画面模式
266
266
  };
267
267
  class O extends L {
268
- constructor(e, i = null) {
269
- super(e), this.handler = null, this.mainLineEntity = null, this.mainPolygonEntity = null, this.dashLineEntity = null, this.dashEndData = new r(), this.drawerMode = f.LINE, this.line_L_ClickEvent = () => {
268
+ constructor(i, e = null) {
269
+ super(i), this.handler = null, this.mainLineEntity = null, this.mainPolygonEntity = null, this.dashLineEntity = null, this.dashEndData = new r(), this.drawerMode = f.LINE, this.line_L_ClickEvent = () => {
270
270
  var t;
271
271
  (t = this.handler) == null || t.setInputAction((a) => {
272
272
  if (h.DRAWABLE == super.getStatus()) {
@@ -322,7 +322,7 @@ class O extends L {
322
322
  entityType: "DASHLINE"
323
323
  }
324
324
  });
325
- }, i && (i.drawerMode && (this.drawerMode = i.drawerMode), this.point = i.point, this.polyline = i.polyline, this.deshline = i.deshline, this.polygon = i.polygon, this.delCallbackFun = i.delCallbackFun ? i.delCallbackFun : this.delCallback);
325
+ }, e && (e.drawerMode && (this.drawerMode = e.drawerMode), this.point = e.point, this.polyline = e.polyline, this.deshline = e.deshline, this.polygon = e.polygon, this.delCallbackFun = e.delCallbackFun ? e.delCallbackFun : this.delCallback);
326
326
  }
327
327
  start() {
328
328
  super.drawableStatus(), this.handler || (this.handler = new w(this.viewer.scene.canvas)), this.line_L_ClickEvent(), this.line_L_DownEvent(), this.line_L_UpEvent(), this.line_moveEvent();
@@ -338,8 +338,8 @@ class O extends L {
338
338
  }
339
339
  //创建主线数据
340
340
  createMainLine() {
341
- let e;
342
- this.polyline ? e = this.polyline : e = {
341
+ let i;
342
+ this.polyline ? i = this.polyline : i = {
343
343
  positions: [new r(), new r()],
344
344
  // 宽度
345
345
  width: 2,
@@ -348,8 +348,8 @@ class O extends L {
348
348
  // 是否显示
349
349
  show: !0,
350
350
  clampToGround: !0
351
- }, e.positions = new A(() => this.mainData, !1), this.mainLineEntity = this.viewer.entities.add({
352
- polyline: e,
351
+ }, i.positions = new A(() => this.mainData, !1), this.mainLineEntity = this.viewer.entities.add({
352
+ polyline: i,
353
353
  properties: {
354
354
  entityType: "LINE"
355
355
  }
@@ -357,13 +357,13 @@ class O extends L {
357
357
  }
358
358
  //创建主面数据
359
359
  createMainPolygon() {
360
- let e;
361
- this.polygon ? e = this.polygon : e = {
360
+ let i;
361
+ this.polygon ? i = this.polygon : i = {
362
362
  hierarchy: [new r(), new r(), new r()],
363
363
  material: u.RED.withAlpha(0.4),
364
364
  outline: !1
365
- }, e.hierarchy = new A(() => new P(this.mainData), !1), this.mainPolygonEntity = this.viewer.entities.add({
366
- polygon: e,
365
+ }, i.hierarchy = new A(() => new P(this.mainData), !1), this.mainPolygonEntity = this.viewer.entities.add({
366
+ polygon: i,
367
367
  properties: {
368
368
  entityType: "POLYGON"
369
369
  }
@@ -372,8 +372,8 @@ class O extends L {
372
372
  }
373
373
  class x extends L {
374
374
  //主面对象
375
- constructor(e, i = null) {
376
- super(e), this.handler = null, this.firstPoint = null, this.endPoint = null, this.lineEntity = null, this.polygonEntity = null, this.rect_L_ClickEvent = () => {
375
+ constructor(i, e = null) {
376
+ super(i), this.handler = null, this.firstPoint = null, this.endPoint = null, this.lineEntity = null, this.polygonEntity = null, this.rect_L_ClickEvent = () => {
377
377
  var t;
378
378
  (t = this.handler) == null || t.setInputAction((a) => {
379
379
  if (h.DRAWABLE == super.getStatus()) {
@@ -400,7 +400,7 @@ class x extends L {
400
400
  l(n) && (h.DRAWABLE == super.getStatus() ? this.firstPoint && (this.endPoint = n, this.initMainData()) : h.EDITABLE == super.getStatus() && this.rectMove(a, n));
401
401
  }
402
402
  }, c.MOUSE_MOVE);
403
- }, i && (this.point = i.point, this.polyline = i.polyline, this.polygon = i.polygon);
403
+ }, e && (this.point = e.point, this.polyline = e.polyline, this.polygon = e.polygon);
404
404
  }
405
405
  start() {
406
406
  super.drawableStatus(), this.handler || (this.handler = new w(this.viewer.scene.canvas)), this.rect_L_ClickEvent(), this.rect_L_DownEvent(), this.rect_L_UpEvent(), this.rect_moveEvent();
@@ -411,25 +411,25 @@ class x extends L {
411
411
  clearAll() {
412
412
  this.clearAllData(), this.firstPoint = new r(), this.endPoint = new r(), this.handler && (this.handler = null), this.polygonEntity && this.viewer.entities.removeById(this.polygonEntity.id), this.lineEntity && this.viewer.entities.removeById(this.lineEntity.id);
413
413
  }
414
- rectMove(e, i) {
414
+ rectMove(i, e) {
415
415
  if (o.DRAG_UNABLED == super.getEditStatus()) {
416
- const t = this.viewer.scene.pick(e.endPosition);
416
+ const t = this.viewer.scene.pick(i.endPosition);
417
417
  if (l(t) && l(t.id) && this.dataSource.entities.contains(d(t.id))) {
418
418
  let a = d(t.id);
419
419
  this.currentDragPoint = a, this.editDragEnable();
420
420
  }
421
- } else o.DRAGING == super.getEditStatus() ? this.currentDragPoint && (this.currentDragPoint.position = new E(i), this.currentIndex === 0 ? this.firstPoint = i : this.endPoint = i, this.initMainData()) : this.editDragUnable();
421
+ } else o.DRAGING == super.getEditStatus() ? this.currentDragPoint && (this.currentDragPoint.position = new E(e), this.currentIndex === 0 ? this.firstPoint = e : this.endPoint = e, this.initMainData()) : this.editDragUnable();
422
422
  }
423
423
  initMainData() {
424
424
  if (this.firstPoint && this.endPoint) {
425
- const e = y.fromCartesian(this.firstPoint), i = e.longitude, t = e.latitude, a = y.fromCartesian(this.endPoint), s = a.longitude, n = a.latitude, v = r.fromRadians(i, n), m = r.fromRadians(s, t);
425
+ const i = y.fromCartesian(this.firstPoint), e = i.longitude, t = i.latitude, a = y.fromCartesian(this.endPoint), s = a.longitude, n = a.latitude, v = r.fromRadians(e, n), m = r.fromRadians(s, t);
426
426
  this.mainData[0] = this.firstPoint, this.mainData[1] = v, this.mainData[2] = this.endPoint, this.mainData[3] = m;
427
427
  }
428
428
  }
429
429
  //创建主线数据
430
430
  createLine() {
431
- let e = null;
432
- this.polyline ? e = this.polyline : e = {
431
+ let i = null;
432
+ this.polyline ? i = this.polyline : i = {
433
433
  positions: [new r(), new r()],
434
434
  // 宽度
435
435
  width: 2,
@@ -438,8 +438,8 @@ class x extends L {
438
438
  // 是否显示
439
439
  show: !0,
440
440
  clampToGround: !0
441
- }, e.positions = new A(() => [...this.mainData, this.mainData[0]], !1), this.lineEntity = this.viewer.entities.add({
442
- polyline: e,
441
+ }, i.positions = new A(() => [...this.mainData, this.mainData[0]], !1), this.lineEntity = this.viewer.entities.add({
442
+ polyline: i,
443
443
  properties: {
444
444
  entityType: "LINE"
445
445
  }
@@ -447,13 +447,13 @@ class x extends L {
447
447
  }
448
448
  //创建主面数据
449
449
  createPolygon() {
450
- let e = null;
451
- this.polygon ? e = this.polygon : e = {
450
+ let i = null;
451
+ this.polygon ? i = this.polygon : i = {
452
452
  hierarchy: [new r(), new r(), new r()],
453
453
  material: u.RED.withAlpha(0.4),
454
454
  outline: !1
455
- }, e.hierarchy = new A(() => new P(this.mainData), !1), this.polygonEntity = this.viewer.entities.add({
456
- polygon: e,
455
+ }, i.hierarchy = new A(() => new P(this.mainData), !1), this.polygonEntity = this.viewer.entities.add({
456
+ polygon: i,
457
457
  properties: {
458
458
  entityType: "POLYGON"
459
459
  }
@@ -462,8 +462,8 @@ class x extends L {
462
462
  }
463
463
  class Q extends L {
464
464
  //主线对象
465
- constructor(e, i = null) {
466
- super(e), this.handler = null, this.firstPoint = new r(), this.endPoint = new r(), this.distance = 0, this.angle = 0, this.endPointEntity = null, this.ellipseEntity = null, this.circle_L_ClickEvent = () => {
465
+ constructor(i, e = null) {
466
+ super(i), this.handler = null, this.firstPoint = new r(), this.endPoint = new r(), this.distance = 0, this.angle = 0, this.endPointEntity = null, this.ellipseEntity = null, this.circle_L_ClickEvent = () => {
467
467
  var t;
468
468
  (t = this.handler) == null || t.setInputAction((a) => {
469
469
  if (h.DRAWABLE == super.getStatus()) {
@@ -490,7 +490,7 @@ class Q extends L {
490
490
  l(n) && (h.DRAWABLE == super.getStatus() ? this.mainData.length > 0 && (this.endPoint = n, this.countDistance()) : h.EDITABLE == super.getStatus() && this.circleMove(a, n));
491
491
  }
492
492
  }, c.MOUSE_MOVE);
493
- }, i && (this.point = i.point, this.ellipse = i.ellipse);
493
+ }, e && (this.point = e.point, this.ellipse = e.ellipse);
494
494
  }
495
495
  start() {
496
496
  super.drawableStatus(), this.handler || (this.handler = new w(this.viewer.scene.canvas)), this.circle_L_ClickEvent(), this.circle_L_DownEvent(), this.circle_L_UpEvent(), this.circle_moveEvent();
@@ -502,37 +502,37 @@ class Q extends L {
502
502
  this.clearAllData(), this.firstPoint = new r(), this.endPoint = new r(), this.handler && (this.handler = null), this.ellipseEntity && this.viewer.entities.removeById(this.ellipseEntity.id);
503
503
  }
504
504
  getAngle() {
505
- const e = b.eastNorthUpToFixedFrame(this.firstPoint.clone()), i = g.inverse(e, new g()), t = g.multiplyByPoint(i, this.endPoint.clone(), new r());
505
+ const i = b.eastNorthUpToFixedFrame(this.firstPoint.clone()), e = g.inverse(i, new g()), t = g.multiplyByPoint(e, this.endPoint.clone(), new r());
506
506
  this.angle = Math.atan2(t.x, t.y);
507
507
  }
508
- circleMove(e, i) {
508
+ circleMove(i, e) {
509
509
  if (o.DRAG_UNABLED == super.getEditStatus()) {
510
- const t = this.viewer.scene.pick(e.endPosition);
510
+ const t = this.viewer.scene.pick(i.endPosition);
511
511
  if (l(t) && l(t.id) && this.dataSource.entities.contains(d(t.id))) {
512
512
  let a = d(t.id);
513
513
  this.currentDragPoint = a, this.editDragEnable();
514
514
  }
515
- } else o.DRAGING == super.getEditStatus() ? this.currentDragPoint && (this.currentDragPoint.position = new E(i), this.currentIndex === 0 ? (this.firstPoint = i, this.ellipseEntity && (this.ellipseEntity.position = new E(this.firstPoint)), this.endPointEntity && (this.updateEndPoint(), this.endPointEntity.position = new E(this.endPoint))) : (this.endPoint = i, this.countDistance())) : this.editDragUnable();
515
+ } else o.DRAGING == super.getEditStatus() ? this.currentDragPoint && (this.currentDragPoint.position = new E(e), this.currentIndex === 0 ? (this.firstPoint = e, this.ellipseEntity && (this.ellipseEntity.position = new E(this.firstPoint)), this.endPointEntity && (this.updateEndPoint(), this.endPointEntity.position = new E(this.endPoint))) : (this.endPoint = e, this.countDistance())) : this.editDragUnable();
516
516
  }
517
517
  updateEndPoint() {
518
- var e = new r(
518
+ var i = new r(
519
519
  this.distance * Math.sin(this.angle),
520
520
  this.distance * Math.cos(this.angle),
521
521
  0
522
522
  // 保持水平,如果希望保持高度则设为 localEdge.z
523
- ), i = b.eastNorthUpToFixedFrame(this.firstPoint), t = g.multiplyByPointAsVector(i, e, new r());
523
+ ), e = b.eastNorthUpToFixedFrame(this.firstPoint), t = g.multiplyByPointAsVector(e, i, new r());
524
524
  this.endPoint = r.add(this.firstPoint, t, new r());
525
525
  }
526
526
  countDistance() {
527
527
  if (this.firstPoint && this.endPoint) {
528
- const e = y.fromCartesian(this.firstPoint), i = y.fromCartesian(this.endPoint), t = new k(e, i);
528
+ const i = y.fromCartesian(this.firstPoint), e = y.fromCartesian(this.endPoint), t = new k(i, e);
529
529
  this.distance = t.surfaceDistance;
530
530
  }
531
531
  }
532
532
  //创建主面数据
533
533
  createCircle() {
534
- let e = null;
535
- this.ellipse ? e = this.ellipse : e = {
534
+ let i = null;
535
+ this.ellipse ? i = this.ellipse : i = {
536
536
  semiMinorAxis: 1,
537
537
  // 短半轴(米)
538
538
  semiMajorAxis: 1,
@@ -546,9 +546,9 @@ class Q extends L {
546
546
  outline: !0,
547
547
  // 是否显示边框
548
548
  outlineColor: u.RED
549
- }, e.semiMinorAxis = e.semiMajorAxis = new A(() => this.distance, !1), this.ellipseEntity = this.viewer.entities.add({
549
+ }, i.semiMinorAxis = i.semiMajorAxis = new A(() => this.distance, !1), this.ellipseEntity = this.viewer.entities.add({
550
550
  position: new E(this.firstPoint),
551
- ellipse: e,
551
+ ellipse: i,
552
552
  properties: {
553
553
  entityType: "ELLIPSE"
554
554
  }
package/drawer.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as D, a as e, b as s, D as R, P as w, R as o } from "./CircleDrawer-DbOS8_ZI.js";
1
+ import { C as D, a as e, b as s, D as R, P as w, R as o } from "./CircleDrawer-RdBslwFS.js";
2
2
  export {
3
3
  D as CP2dDrawer,
4
4
  e as CircleDrawer,
package/index.js CHANGED
@@ -3,7 +3,7 @@ import * as PA from "three";
3
3
  import { TrianglesDrawMode as tP, TriangleFanDrawMode as EA, TriangleStripDrawMode as SA, Loader as sP, LoaderUtils as F, FileLoader as qA, Color as S, LinearSRGBColorSpace as H, SpotLight as BP, PointLight as rP, DirectionalLight as vP, MeshBasicMaterial as W, SRGBColorSpace as R, MeshPhysicalMaterial as y, Vector2 as VA, Matrix4 as tA, Vector3 as K, Quaternion as hA, InstancedMesh as gP, InstancedBufferAttribute as CP, Object3D as JA, TextureLoader as DP, ImageBitmapLoader as wP, BufferAttribute as BA, InterleavedBuffer as QP, InterleavedBufferAttribute as cP, LinearMipmapLinearFilter as YA, NearestMipmapLinearFilter as IP, LinearMipmapNearestFilter as EP, NearestMipmapNearestFilter as zP, LinearFilter as zA, NearestFilter as NA, RepeatWrapping as TA, MirroredRepeatWrapping as TP, ClampToEdgeWrapping as lP, PointsMaterial as oP, Material as rA, LineBasicMaterial as aP, MeshStandardMaterial as KA, DoubleSide as MP, PropertyBinding as uP, BufferGeometry as pP, SkinnedMesh as bP, Mesh as iP, LineSegments as fP, Line as UP, LineLoop as yP, Points as dP, Group as vA, PerspectiveCamera as jP, MathUtils as HP, OrthographicCamera as mP, Skeleton as kP, AnimationClip as LP, Bone as OP, InterpolateDiscrete as SP, InterpolateLinear as XA, ColorManagement as MA, Texture as uA, VectorKeyframeTrack as pA, NumberKeyframeTrack as bA, QuaternionKeyframeTrack as iA, FrontSide as qP, Interpolant as VP, Box3 as hP, Sphere as JP } from "three";
4
4
  import { Viewer as h, Math as _, Cartesian2 as eA, Cartesian3 as L, Cartographic as ZA, SceneTransforms as YP, Ray as NP, Color as KP, ScreenSpaceEventType as gA, ScreenSpaceEventHandler as XP, createWorldTerrainAsync as ZP, EllipsoidTerrainProvider as GP, WebMapTileServiceImageryProvider as Y, Credit as N } from "cesium";
5
5
  import { P as G, a as fA, b as xP, c as WP, d as FP, C as UA } from "./index-CcaLwHv1.js";
6
- import { C as Mn, a as un, b as pn, D as bn, P as fn, R as Un } from "./CircleDrawer-DbOS8_ZI.js";
6
+ import { C as Mn, a as un, b as pn, D as bn, P as fn, R as Un } from "./CircleDrawer-RdBslwFS.js";
7
7
  function yA(D, A) {
8
8
  if (A === tP)
9
9
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), D;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cesium-pocket",
3
- "version": "0.3.1-alpha",
3
+ "version": "0.3.2-alpha",
4
4
  "description": "cesium的插件库;基于vue3的开发",
5
5
  "module": "./index.js",
6
6
  "types": "./index.d.ts",