@aibee/crc-bmap 0.0.63 → 0.0.64

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
@@ -1966,6 +1966,7 @@ var Selection = class extends EventDispatcher4 {
1966
1966
  __publicField(this, "prevPanStatus");
1967
1967
  __publicField(this, "prevRotateStatus");
1968
1968
  __publicField(this, "downPoint", null);
1969
+ __publicField(this, "isMultipleSelect", false);
1969
1970
  __publicField(this, "onPointerDown", (e) => {
1970
1971
  this.downPoint = { x: e.offsetX, y: e.offsetY };
1971
1972
  });
@@ -1985,7 +1986,7 @@ var Selection = class extends EventDispatcher4 {
1985
1986
  var _a;
1986
1987
  if (!graphicIdSet.has(item.options.id)) {
1987
1988
  const graphic = ((_a = this.context.currentFloor) == null ? void 0 : _a.graphicLayer.graphicMap.get(item.options.id)) || null;
1988
- if (graphic) {
1989
+ if (graphic && graphic.options.geometry.type === "point") {
1989
1990
  graphics.push(graphic);
1990
1991
  graphicIdSet.add(item.options.id);
1991
1992
  }
@@ -2000,6 +2001,7 @@ var Selection = class extends EventDispatcher4 {
2000
2001
  });
2001
2002
  __publicField(this, "onKeyDown", (e) => {
2002
2003
  if (e.key === "Control") {
2004
+ this.isMultipleSelect = true;
2003
2005
  this.boxSelection.setEnable(true);
2004
2006
  this.prevPanStatus = this.context.control.enablePan;
2005
2007
  this.prevRotateStatus = this.context.control.enableRotate;
@@ -2009,6 +2011,7 @@ var Selection = class extends EventDispatcher4 {
2009
2011
  });
2010
2012
  __publicField(this, "onKeyUp", (e) => {
2011
2013
  if (e.key === "Control") {
2014
+ this.isMultipleSelect = false;
2012
2015
  this.boxSelection.setEnable(false);
2013
2016
  this.context.control.enablePan = !!this.prevPanStatus;
2014
2017
  this.context.control.enableRotate = !!this.prevRotateStatus;
@@ -2029,7 +2032,7 @@ var Selection = class extends EventDispatcher4 {
2029
2032
  return this._list;
2030
2033
  }
2031
2034
  selectEnd() {
2032
- this.dispatchEvent({ type: "select", graphics: [...this._list] });
2035
+ this.dispatchEvent({ type: "select", graphics: [...this._list], isMultipleSelect: this.isMultipleSelect });
2033
2036
  }
2034
2037
  registryEvent() {
2035
2038
  this.context.container.addEventListener("pointerdown", this.onPointerDown);
@@ -2069,14 +2072,19 @@ var HoverHelper = class extends EventDispatcher5 {
2069
2072
  const poiGraphics = pois.map((item) => {
2070
2073
  var _a;
2071
2074
  return (_a = this.context.currentFloor) == null ? void 0 : _a.graphicLayer.graphicMap.get(item.options.id);
2072
- });
2075
+ }).filter((graphic) => graphic && graphic.options.geometry.type === "point");
2073
2076
  if (!graphics.length && !poiGraphics && this.curGraphics.size) {
2074
2077
  this.curGraphics.clear();
2075
2078
  this.handleHoverGraphicsChange();
2076
2079
  return;
2077
2080
  }
2078
2081
  const { time } = this.context.config.hover;
2079
- const allGraphics = /* @__PURE__ */ new Set([...graphics, ...poiGraphics]);
2082
+ const allGraphics = new Set(graphics);
2083
+ if (!allGraphics.size) {
2084
+ poiGraphics.forEach((graphic) => {
2085
+ allGraphics.add(graphic);
2086
+ });
2087
+ }
2080
2088
  allGraphics.forEach((graphic) => {
2081
2089
  if (this.graphicTimerMap.get(graphic)) {
2082
2090
  return;
@@ -2244,8 +2252,8 @@ var Context = class extends EventDispatcher6 {
2244
2252
  __publicField(this, "onPointerleave", () => {
2245
2253
  this.dispatchEvent({ type: "pointer-level" });
2246
2254
  });
2247
- __publicField(this, "onSelectionSelect", ({ graphics }) => {
2248
- this.dispatchEvent({ type: "select-graphic", graphics });
2255
+ __publicField(this, "onSelectionSelect", ({ graphics, isMultipleSelect }) => {
2256
+ this.dispatchEvent({ type: "select-graphic", graphics, isMultipleSelect });
2249
2257
  });
2250
2258
  __publicField(this, "onHoverChange", ({ graphics }) => {
2251
2259
  this.dispatchEvent({ type: "hover", graphics });