@orbat-mapper/tactical-draw 0.34.0 → 0.36.0

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.
@@ -1,4 +1,4 @@
1
- import { a as LayerId, o as MapAdapter, p as PixelCoordinate } from "./map-adapter-g2v5Ok3Y.mjs";
1
+ import { m as PixelCoordinate, o as LayerId, s as MapAdapter } from "./map-adapter-CTbZTAL0.mjs";
2
2
  import { Feature } from "geojson";
3
3
 
4
4
  //#region src/testing/feature-group-conformance.d.ts
package/dist/testing.mjs CHANGED
@@ -294,6 +294,19 @@ function runGroupedPickConformance(name, createSubject) {
294
294
  subject.adapter.setLayerFeatureGroups(subject.layerId, [group("lower", lower), group("higher", higher)]);
295
295
  expect(subject.pickAt([0, 50], [lower, higher])).toBe("higher");
296
296
  });
297
+ it("never picks a not-hit-area feature, falling through to what lies beneath", () => {
298
+ const subject = createSubject();
299
+ const lower = line("lower");
300
+ const higher = line("higher", { hitArea: false });
301
+ subject.adapter.setLayerFeatureGroups(subject.layerId, [group("lower", lower), group("higher", higher)]);
302
+ expect(subject.pickAt([0, 50], [higher, lower])).toBe("lower");
303
+ });
304
+ it("picks nothing when the only feature hit is not hit area", () => {
305
+ const subject = createSubject();
306
+ const only = line("only", { hitArea: false });
307
+ subject.adapter.setLayerFeatureGroups(subject.layerId, [group("only", only)]);
308
+ expect(subject.pickAt([0, 50], [only])).toBeNull();
309
+ });
297
310
  it.each([
298
311
  [
299
312
  "opaque",
@@ -329,7 +342,7 @@ function group(id, feature) {
329
342
  iconResources: []
330
343
  };
331
344
  }
332
- function line(id) {
345
+ function line(id, properties = {}) {
333
346
  return {
334
347
  type: "Feature",
335
348
  id: `${id}:main:0`,
@@ -337,7 +350,7 @@ function line(id) {
337
350
  type: "LineString",
338
351
  coordinates: [[-100, 50], [100, 50]]
339
352
  },
340
- properties: {}
353
+ properties
341
354
  };
342
355
  }
343
356
  function polygon(id, style) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbat-mapper/tactical-draw",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
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",
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "dependencies": {
42
- "@orbat-mapper/control-measures": "^0.46.0"
42
+ "@orbat-mapper/control-measures": "^0.46.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "vitest": ">=4.0.0"
@@ -52,6 +52,7 @@
52
52
  "devDependencies": {
53
53
  "@arethetypeswrong/core": "^0.18.3",
54
54
  "@types/geojson": "^7946.0.16",
55
+ "esbuild": "0.28.1",
55
56
  "jsdom": "^27.4.0",
56
57
  "publint": "^0.3.21",
57
58
  "tsdown": "^0.22.2",