@zwishing/emap 0.3.0 → 0.3.1

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,5 +1,6 @@
1
1
  import type { Control } from './control';
2
2
  import type { Emap } from '../map/map';
3
+ import type { ModifierCombo } from '../core/handlers/select-mode';
3
4
  export type { BoxSelectStyle } from '../core/handlers/box-select';
4
5
  import type { BoxSelectStyle } from '../core/handlers/box-select';
5
6
  export interface BoxSelectControlOptions {
@@ -15,17 +16,22 @@ export interface BoxSelectControlOptions {
15
16
  * Default `4`.
16
17
  */
17
18
  dragThreshold?: number;
19
+ /**
20
+ * Modifier combo required to start dragging. Default `'none'`, so an active
21
+ * box-select tool starts with a plain left-drag.
22
+ */
23
+ dragActivator?: ModifierCombo;
18
24
  }
19
25
  /**
20
26
  * Thin shell over the `map.boxSelect` handler (DX P2c). The handler owns
21
- * the shift+drag gesture, the `.emap-box-select` rubber-band overlay,
27
+ * the drag gesture, the `.emap-box-select` rubber-band overlay,
22
28
  * hit-testing, and selection; this control just forwards options and
23
29
  * proxies enable/disable, returning a 0×0 anchor for `addControl`
24
30
  * placement. Public class, options, anchor DOM, and selection behaviour
25
31
  * are unchanged from the pre-P2c control.
26
32
  *
27
- * Modifier conventions (on top of shift): shift→`replace`,
28
- * shift+ctrl/meta→`add`, shift+alt→`toggle`. Mutually exclusive with
33
+ * Modifier conventions: plain drag→`replace`, shift→`add`,
34
+ * shift+alt→`toggle`. Mutually exclusive with
29
35
  * lasso-select — `onAdd` propagates the handler's throw if `lassoSelect`
30
36
  * is already enabled.
31
37
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zwishing/emap",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A modern, decoupled rendering engine for mapshaper data",
5
5
  "main": "dist/emap.mjs",
6
6
  "module": "dist/emap.mjs",