@aibee/crc-bmap 0.0.76 → 0.0.78

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
@@ -1316,12 +1316,7 @@ var PoiLayer = class extends Layer {
1316
1316
  return;
1317
1317
  }
1318
1318
  const valid = range.some((box) => {
1319
- const xIntersect = right < box.right && right > box.left || left > box.left && left < box.right || left === box.left && right === box.right;
1320
- if (xIntersect) {
1321
- const yIntersect = bottom <= box.bottom && bottom > box.top || top >= box.top && top < box.bottom;
1322
- return yIntersect;
1323
- }
1324
- return false;
1319
+ return box.left < right && box.right > left && box.top < bottom && box.bottom > top;
1325
1320
  });
1326
1321
  item.parentSetVisible(!valid);
1327
1322
  if (!valid) {
@@ -2260,24 +2255,23 @@ var HoverHelper = class extends EventDispatcher5 {
2260
2255
  return;
2261
2256
  }
2262
2257
  const { time } = this.context.config.hover;
2263
- const allGraphics = new Set(graphics);
2258
+ const allGraphics = /* @__PURE__ */ new Set();
2259
+ if (poiGraphics.length) {
2260
+ let resGraphic;
2261
+ let distance = 1e4;
2262
+ poiGraphics.forEach((graphic) => {
2263
+ const poi = pois.find((poi2) => poi2.options.id === graphic.options.id);
2264
+ const { x, y } = poi.clientPos;
2265
+ let curDistance = Math.sqrt(__pow(x - e.offsetX, 2) + __pow(y - e.offsetY, 2));
2266
+ if (curDistance < distance) {
2267
+ distance = curDistance;
2268
+ resGraphic = graphic;
2269
+ }
2270
+ });
2271
+ allGraphics.add(resGraphic);
2272
+ }
2264
2273
  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
- }
2274
+ graphics.forEach((graphic) => allGraphics.add(graphic));
2281
2275
  }
2282
2276
  allGraphics.forEach((graphic) => {
2283
2277
  if (this.graphicTimerMap.get(graphic)) {