@orbat-mapper/tactical-draw 0.36.1 → 0.36.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -361,13 +361,13 @@ function evaluateGeometry(feature, presentation, context) {
361
361
  function evaluatePolygon(pixel, rings, presentation, context, pickInterior) {
362
362
  const { tolerance, toPixel, viewport } = context;
363
363
  const projectedRings = rings.map((ring) => ring.map(toPixel));
364
- const distance = hasVisibleBoundary(presentation) ? minimum(projectedRings.map((points) => minVisibleSegmentDistance(pixel, points, viewport))) : null;
364
+ const visiblyFilled = (presentation.fill?.opacity ?? 0) > 0;
365
+ const distance = hasVisibleBoundary(presentation) || visiblyFilled ? minimum(projectedRings.map((points) => minVisibleSegmentDistance(pixel, points, viewport))) : null;
365
366
  if (distance !== null && distance <= tolerance) return {
366
367
  kind: "polygon-boundary",
367
368
  distance
368
369
  };
369
370
  if (!(projectedRings.length > 0 && pointInProjectedRing(pixel, projectedRings[0]) && !projectedRings.slice(1).some((points) => pointInProjectedRing(pixel, points)))) return null;
370
- const visiblyFilled = (presentation.fill?.opacity ?? 0) > 0;
371
371
  const inwardReach = context.pointerType === "touch" ? 36 : 24;
372
372
  if (pickInterior || visiblyFilled || distance !== null && distance <= inwardReach) return {
373
373
  kind: "polygon-interior",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbat-mapper/tactical-draw",
3
- "version": "0.36.1",
3
+ "version": "0.36.2",
4
4
  "description": "Engine-agnostic draw/edit core for tactical control measures (MIL-STD-2525 / APP-6). The MapAdapter ABI and bring-your-own-engine entry point for the tactical-draw package family.",
5
5
  "license": "MIT",
6
6
  "author": "Orbat Mapper",