@aibee/crc-bmap 0.0.76 → 0.0.77

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
@@ -2260,24 +2260,23 @@ var HoverHelper = class extends EventDispatcher5 {
2260
2260
  return;
2261
2261
  }
2262
2262
  const { time } = this.context.config.hover;
2263
- const allGraphics = new Set(graphics);
2263
+ const allGraphics = /* @__PURE__ */ new Set();
2264
+ if (poiGraphics.length) {
2265
+ let resGraphic;
2266
+ let distance = 1e4;
2267
+ poiGraphics.forEach((graphic) => {
2268
+ const poi = pois.find((poi2) => poi2.options.id === graphic.options.id);
2269
+ const { x, y } = poi.clientPos;
2270
+ let curDistance = Math.sqrt(__pow(x - e.offsetX, 2) + __pow(y - e.offsetY, 2));
2271
+ if (curDistance < distance) {
2272
+ distance = curDistance;
2273
+ resGraphic = graphic;
2274
+ }
2275
+ });
2276
+ allGraphics.add(resGraphic);
2277
+ }
2264
2278
  if (!allGraphics.size) {
2265
- if (poiGraphics.length === 1) {
2266
- allGraphics.add(poiGraphics[0]);
2267
- } else if (poiGraphics.length) {
2268
- let resGraphic;
2269
- let distance = 1e4;
2270
- poiGraphics.forEach((graphic) => {
2271
- const poi = pois.find((poi2) => poi2.options.id === graphic.options.id);
2272
- const { x, y } = poi.clientPos;
2273
- let curDistance = Math.sqrt(__pow(x - e.offsetX, 2) + __pow(y - e.offsetY, 2));
2274
- if (curDistance < distance) {
2275
- distance = curDistance;
2276
- resGraphic = graphic;
2277
- }
2278
- });
2279
- allGraphics.add(resGraphic);
2280
- }
2279
+ graphics.forEach((graphic) => allGraphics.add(graphic));
2281
2280
  }
2282
2281
  allGraphics.forEach((graphic) => {
2283
2282
  if (this.graphicTimerMap.get(graphic)) {