@aibee/crc-bmap 0.0.73 → 0.0.74

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/lib/bmap.esm.js CHANGED
@@ -1308,13 +1308,7 @@ var PoiLayer = class extends Layer {
1308
1308
  */
1309
1309
  collisionDetection() {
1310
1310
  const range = [];
1311
- const pois = this.pois.filter((item) => {
1312
- if (item.visible && item.withinDisplayRange) {
1313
- return true;
1314
- } else {
1315
- item.parentSetVisible(false);
1316
- }
1317
- });
1311
+ const pois = this.pois.filter((item) => item.visible && item.withinDisplayRange);
1318
1312
  pois.forEach((item, index) => {
1319
1313
  const { left, right, top, bottom } = item.getBox();
1320
1314
  if (index === 0) {
@@ -3212,11 +3206,13 @@ var BMap = class extends EventDispatcher7 {
3212
3206
  * @param duration
3213
3207
  */
3214
3208
  translateElementToCenterX(ele, duration = 500) {
3215
- const { y, z } = this.context.camera.position;
3216
- const position = ele.getPosition();
3217
- position.setY(y);
3218
- position.setZ(z);
3219
- return this.context.setCameraPosition(position, duration);
3209
+ return __async(this, null, function* () {
3210
+ const { y, z } = this.context.control.target;
3211
+ const position = ele.getPosition();
3212
+ position.setY(y);
3213
+ position.setZ(z);
3214
+ yield this.context.setCameraPosition(position, duration);
3215
+ });
3220
3216
  }
3221
3217
  /**
3222
3218
  * 获取物体的屏幕坐标