@orbat-mapper/tactical-draw 0.25.0 → 0.26.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.
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as PinPresentationCapability, A as PointSymbolConnector, B as isPointSymbol, C as makeFillPatternImage, D as PointSymbolAnchor, E as PointSymbol, F as PointSymbolRect, G as ResolvedEditModifiers, H as DEFAULT_EDIT_MODIFIERS, I as PointSymbolRender, J as PointerEventInfo, K as EditPointerDriver, L as PointSymbolSize, M as PointSymbolOffset, N as PointSymbolOffsetStyle, O as PointSymbolCapability, P as PointSymbolPlacement, Q as PinPresentation, R as PointSymbolStyle, S as isMinePattern, T as OffsetDragModifier, U as EditModifiers, V as resizePointSymbolSize, W as ModifierKey, X as PinFootprint, Y as DEFAULT_PIN_PRESENTATION, Z as PinOverridePatch, _ as HatchPattern, a as LayerId, at as PinRender, b as fillPatternImageDimension, c as MapEvent, ct as pinDistanceScale, d as PickHandler, et as PinPresentationPatch, f as PickOptions, g as HATCH_PATTERNS, h as TextStyleOptions, i as ImageOverlayResource, it as PinPresentationStore, j as PointSymbolGraphicModifiers, k as PointSymbolColors, l as MapEventHandler, lt as pinZoomScale, m as StyleOptions, n as HandleStyle, nt as PinPresentationStatus, o as MapAdapter, ot as combinePinScale, p as PixelCoordinate, q as PointerCallback, r as IconResource, rt as PinPresentationStatusEvent, s as MapCursor, st as isValidPinNumber, t as FeatureGroup, tt as PinPresentationState, u as PickEvent, ut as resolvePinPresentation, v as MINE_PATTERN_TILE_SIZE, w as parseColor, x as fillPatternImageId, y as Rgba, z as clonePointSymbol } from "./map-adapter-
|
|
1
|
+
import { $ as PinPresentationCapability, A as PointSymbolConnector, B as isPointSymbol, C as makeFillPatternImage, D as PointSymbolAnchor, E as PointSymbol, F as PointSymbolRect, G as ResolvedEditModifiers, H as DEFAULT_EDIT_MODIFIERS, I as PointSymbolRender, J as PointerEventInfo, K as EditPointerDriver, L as PointSymbolSize, M as PointSymbolOffset, N as PointSymbolOffsetStyle, O as PointSymbolCapability, P as PointSymbolPlacement, Q as PinPresentation, R as PointSymbolStyle, S as isMinePattern, T as OffsetDragModifier, U as EditModifiers, V as resizePointSymbolSize, W as ModifierKey, X as PinFootprint, Y as DEFAULT_PIN_PRESENTATION, Z as PinOverridePatch, _ as HatchPattern, a as LayerId, at as PinRender, b as fillPatternImageDimension, c as MapEvent, ct as pinDistanceScale, d as PickHandler, et as PinPresentationPatch, f as PickOptions, g as HATCH_PATTERNS, h as TextStyleOptions, i as ImageOverlayResource, it as PinPresentationStore, j as PointSymbolGraphicModifiers, k as PointSymbolColors, l as MapEventHandler, lt as pinZoomScale, m as StyleOptions, n as HandleStyle, nt as PinPresentationStatus, o as MapAdapter, ot as combinePinScale, p as PixelCoordinate, q as PointerCallback, r as IconResource, rt as PinPresentationStatusEvent, s as MapCursor, st as isValidPinNumber, t as FeatureGroup, tt as PinPresentationState, u as PickEvent, ut as resolvePinPresentation, v as MINE_PATTERN_TILE_SIZE, w as parseColor, x as fillPatternImageId, y as Rgba, z as clonePointSymbol } from "./map-adapter-mmWf_Jig.mjs";
|
|
2
2
|
import { AmplifierPlacement, AmplifierPlacements, ControlMeasure, ControlMeasureKind, ControlMeasureRender, ControlMeasureStyle, HighlightAppearance, LabelFit, SymbolColors, TextAmplifiers } from "@orbat-mapper/control-measures";
|
|
3
3
|
import { Feature, Position } from "geojson";
|
|
4
4
|
|
package/dist/index.mjs
CHANGED
|
@@ -5312,9 +5312,13 @@ function runEdit(opts) {
|
|
|
5312
5312
|
}]);
|
|
5313
5313
|
}
|
|
5314
5314
|
/** Live view scale for option handles behind pixel-authored sizes. */
|
|
5315
|
-
|
|
5315
|
+
/** The live view state for option handles; `modifier` adds the press's modifier-drag key. */
|
|
5316
|
+
function optionHandleContext(modifier = false) {
|
|
5316
5317
|
const resolution = adapter.getResolution();
|
|
5317
|
-
return
|
|
5318
|
+
return {
|
|
5319
|
+
...hasUsableResolution(resolution) ? { constructionMetersPerCssPixel: resolution } : {},
|
|
5320
|
+
...modifier ? { modifier: true } : {}
|
|
5321
|
+
};
|
|
5318
5322
|
}
|
|
5319
5323
|
function buildCurrentHandleSet() {
|
|
5320
5324
|
const handles = buildHandleSet(workingPoints, modes, {
|
|
@@ -5909,7 +5913,7 @@ function runEdit(opts) {
|
|
|
5909
5913
|
if (frame.part !== void 0) parts.select(frame.part);
|
|
5910
5914
|
}
|
|
5911
5915
|
function optionsForOptionHandle(position, drag) {
|
|
5912
|
-
const patch = dragControlMeasureOptionHandle(measure.kind, workingPoints, drag.preDragOptions, drag.handleId, position, optionHandleContext());
|
|
5916
|
+
const patch = dragControlMeasureOptionHandle(measure.kind, workingPoints, drag.preDragOptions, drag.handleId, position, optionHandleContext(drag.modifier));
|
|
5913
5917
|
return patch ? {
|
|
5914
5918
|
...drag.preDragOptions ?? {},
|
|
5915
5919
|
...patch
|
|
@@ -6086,8 +6090,9 @@ function runEdit(opts) {
|
|
|
6086
6090
|
if (hit.kind === "vertex") parts.select(topology.partOf(hit.index));
|
|
6087
6091
|
else if (hit.kind === "midpoint") parts.select(hit.segment?.part);
|
|
6088
6092
|
if (hit.kind === "vertex" && modifierHeld(info, keys().modifierDrag) && startModifierDrag(hit.index, pixel, tol)) return;
|
|
6093
|
+
const optionModifier = hit.kind === "option" && modifierHeld(info, keys().modifierDrag);
|
|
6089
6094
|
if (hit.kind === "option" && hit.optionId && deleteOrReset) {
|
|
6090
|
-
const patch = resetControlMeasureOptionHandle(measure.kind, workingPoints, workingOptions, hit.optionId, optionHandleContext());
|
|
6095
|
+
const patch = resetControlMeasureOptionHandle(measure.kind, workingPoints, workingOptions, hit.optionId, optionHandleContext(optionModifier));
|
|
6091
6096
|
if (patch) {
|
|
6092
6097
|
setOptions(patch, "gesture", "Reset option handle");
|
|
6093
6098
|
shell.suppressNextClickAway();
|
|
@@ -6098,7 +6103,8 @@ function runEdit(opts) {
|
|
|
6098
6103
|
activeOptionDrag = {
|
|
6099
6104
|
handleId: hit.optionId,
|
|
6100
6105
|
preDragOptions: workingOptions,
|
|
6101
|
-
preDragNonGeometryDirty: nonGeometryDirty
|
|
6106
|
+
preDragNonGeometryDirty: nonGeometryDirty,
|
|
6107
|
+
modifier: optionModifier
|
|
6102
6108
|
};
|
|
6103
6109
|
transient.emit("start", workingPoints, null);
|
|
6104
6110
|
dragInFlight = true;
|
|
@@ -227,7 +227,8 @@ interface EditModifiers {
|
|
|
227
227
|
/**
|
|
228
228
|
* Drag a vertex with this key held to hand the gesture to the definition's
|
|
229
229
|
* `modifierDrag` hook (e.g. a Flow Arrow split or merge). Any key in a list
|
|
230
|
-
* starts it.
|
|
230
|
+
* starts it. Held while pressing an option handle, it lets the definition
|
|
231
|
+
* widen that drag or reset (e.g. sizing every Split Arrow head at once).
|
|
231
232
|
* @default ["ctrl", "meta"]
|
|
232
233
|
*/
|
|
233
234
|
modifierDrag?: ModifierKey | readonly ModifierKey[] | false;
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as LayerId, o as MapAdapter, p as PixelCoordinate } from "./map-adapter-
|
|
1
|
+
import { a as LayerId, o as MapAdapter, p as PixelCoordinate } from "./map-adapter-mmWf_Jig.mjs";
|
|
2
2
|
import { Feature } from "geojson";
|
|
3
3
|
|
|
4
4
|
//#region src/testing/feature-group-conformance.d.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbat-mapper/tactical-draw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.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.
|
|
42
|
+
"@orbat-mapper/control-measures": "^0.42.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"vitest": ">=4.0.0"
|