@aibee/crc-bmap 0.0.26 → 0.0.28

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
@@ -757,6 +757,7 @@ var Poi = class extends Object3D4 {
757
757
  div.style.justifyContent = `center`;
758
758
  div.style.alignItems = `center`;
759
759
  div.style.pointerEvents = `none`;
760
+ this.overlay.setOpacity(this.options.opacity);
760
761
  return div;
761
762
  }
762
763
  getPosition() {
@@ -926,6 +927,10 @@ var PoiLayer = class extends Layer {
926
927
  this.removePoi(poi);
927
928
  }
928
929
  }
930
+ getPoiById(id) {
931
+ const poi = this.pois.find((item) => item.options.id === id);
932
+ return poi || null;
933
+ }
929
934
  /**
930
935
  * 保存poi按照level排序
931
936
  * @param poi
@@ -1604,6 +1609,12 @@ var BoxSelection = class extends BaseSvg {
1604
1609
  setEnable(enable) {
1605
1610
  super.setEnable(enable);
1606
1611
  setRectPosition(this.rect, 0, 0, 0, 0);
1612
+ if (enable) {
1613
+ this.registryEvent();
1614
+ } else {
1615
+ this.startPoint = void 0;
1616
+ this.unRegistryEvent();
1617
+ }
1607
1618
  }
1608
1619
  registryEvent() {
1609
1620
  this.context.container.addEventListener("pointerdown", this.onPointerDown);
@@ -2550,6 +2561,10 @@ var BMap = class extends EventDispatcher6 {
2550
2561
  var _a;
2551
2562
  return (_a = this.context.currentFloor) == null ? void 0 : _a.poiLayer.removePoiById(id);
2552
2563
  }
2564
+ getPoiById(id) {
2565
+ var _a;
2566
+ return (_a = this.context.currentFloor) == null ? void 0 : _a.poiLayer.getPoiById(id);
2567
+ }
2553
2568
  getPois() {
2554
2569
  var _a;
2555
2570
  return ((_a = this.context.currentFloor) == null ? void 0 : _a.poiLayer.pois) || [];