@deck.gl-community/editable-layers 9.0.2 → 9.1.0-beta.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.
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/edit-modes/composite-mode.d.ts +4 -3
- package/dist/edit-modes/composite-mode.d.ts.map +1 -0
- package/dist/edit-modes/composite-mode.js +1 -1
- package/dist/edit-modes/delete-mode.d.ts +7 -0
- package/dist/edit-modes/delete-mode.d.ts.map +1 -0
- package/dist/edit-modes/delete-mode.js +22 -0
- package/dist/edit-modes/draw-90degree-polygon-mode.d.ts +4 -3
- package/dist/edit-modes/draw-90degree-polygon-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-90degree-polygon-mode.js +2 -2
- package/dist/edit-modes/draw-circle-by-diameter-mode.d.ts +4 -3
- package/dist/edit-modes/draw-circle-by-diameter-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-circle-by-diameter-mode.js +7 -3
- package/dist/edit-modes/draw-circle-from-center-mode.d.ts +4 -3
- package/dist/edit-modes/draw-circle-from-center-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-circle-from-center-mode.js +6 -2
- package/dist/edit-modes/draw-ellipse-by-bounding-box-mode.d.ts +3 -2
- package/dist/edit-modes/draw-ellipse-by-bounding-box-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-ellipse-by-bounding-box-mode.js +11 -3
- package/dist/edit-modes/draw-ellipse-using-three-points-mode.d.ts +3 -2
- package/dist/edit-modes/draw-ellipse-using-three-points-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-ellipse-using-three-points-mode.js +12 -3
- package/dist/edit-modes/draw-line-string-mode.d.ts +4 -3
- package/dist/edit-modes/draw-line-string-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-line-string-mode.js +3 -3
- package/dist/edit-modes/draw-point-mode.d.ts +4 -3
- package/dist/edit-modes/draw-point-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-point-mode.js +1 -1
- package/dist/edit-modes/draw-polygon-by-dragging-mode.d.ts +4 -3
- package/dist/edit-modes/draw-polygon-by-dragging-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-polygon-by-dragging-mode.js +2 -2
- package/dist/edit-modes/draw-polygon-mode.d.ts +4 -3
- package/dist/edit-modes/draw-polygon-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-polygon-mode.js +2 -2
- package/dist/edit-modes/draw-rectangle-from-center-mode.d.ts +3 -2
- package/dist/edit-modes/draw-rectangle-from-center-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-rectangle-from-center-mode.js +1 -1
- package/dist/edit-modes/draw-rectangle-mode.d.ts +3 -2
- package/dist/edit-modes/draw-rectangle-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-rectangle-mode.js +1 -1
- package/dist/edit-modes/draw-rectangle-using-three-points-mode.d.ts +3 -2
- package/dist/edit-modes/draw-rectangle-using-three-points-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-rectangle-using-three-points-mode.js +2 -2
- package/dist/edit-modes/draw-square-from-center-mode.d.ts +3 -2
- package/dist/edit-modes/draw-square-from-center-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-square-from-center-mode.js +1 -1
- package/dist/edit-modes/draw-square-mode.d.ts +3 -2
- package/dist/edit-modes/draw-square-mode.d.ts.map +1 -0
- package/dist/edit-modes/draw-square-mode.js +1 -1
- package/dist/edit-modes/duplicate-mode.d.ts +4 -3
- package/dist/edit-modes/duplicate-mode.d.ts.map +1 -0
- package/dist/edit-modes/duplicate-mode.js +1 -1
- package/dist/edit-modes/edit-mode.d.ts +2 -1
- package/dist/edit-modes/edit-mode.d.ts.map +1 -0
- package/dist/edit-modes/elevation-mode.d.ts +4 -3
- package/dist/edit-modes/elevation-mode.d.ts.map +1 -0
- package/dist/edit-modes/elevation-mode.js +2 -2
- package/dist/edit-modes/extend-line-string-mode.d.ts +4 -3
- package/dist/edit-modes/extend-line-string-mode.d.ts.map +1 -0
- package/dist/edit-modes/extend-line-string-mode.js +5 -2
- package/dist/edit-modes/extrude-mode.d.ts +4 -3
- package/dist/edit-modes/extrude-mode.d.ts.map +1 -0
- package/dist/edit-modes/extrude-mode.js +6 -3
- package/dist/edit-modes/geojson-edit-mode.d.ts +6 -5
- package/dist/edit-modes/geojson-edit-mode.d.ts.map +1 -0
- package/dist/edit-modes/geojson-edit-mode.js +9 -6
- package/dist/edit-modes/immutable-feature-collection.d.ts +2 -1
- package/dist/edit-modes/immutable-feature-collection.d.ts.map +1 -0
- package/dist/edit-modes/measure-angle-mode.d.ts +4 -3
- package/dist/edit-modes/measure-angle-mode.d.ts.map +1 -0
- package/dist/edit-modes/measure-angle-mode.js +2 -2
- package/dist/edit-modes/measure-area-mode.d.ts +4 -3
- package/dist/edit-modes/measure-area-mode.d.ts.map +1 -0
- package/dist/edit-modes/measure-area-mode.js +1 -1
- package/dist/edit-modes/measure-distance-mode.d.ts +4 -3
- package/dist/edit-modes/measure-distance-mode.d.ts.map +1 -0
- package/dist/edit-modes/measure-distance-mode.js +2 -2
- package/dist/edit-modes/modify-mode.d.ts +5 -4
- package/dist/edit-modes/modify-mode.d.ts.map +1 -0
- package/dist/edit-modes/modify-mode.js +6 -3
- package/dist/edit-modes/resize-circle-mode.d.ts +6 -5
- package/dist/edit-modes/resize-circle-mode.d.ts.map +1 -0
- package/dist/edit-modes/resize-circle-mode.js +4 -3
- package/dist/edit-modes/rotate-mode.d.ts +4 -3
- package/dist/edit-modes/rotate-mode.d.ts.map +1 -0
- package/dist/edit-modes/rotate-mode.js +5 -4
- package/dist/edit-modes/scale-mode.d.ts +4 -3
- package/dist/edit-modes/scale-mode.d.ts.map +1 -0
- package/dist/edit-modes/scale-mode.js +5 -4
- package/dist/edit-modes/snappable-mode.d.ts +4 -3
- package/dist/edit-modes/snappable-mode.d.ts.map +1 -0
- package/dist/edit-modes/snappable-mode.js +2 -2
- package/dist/edit-modes/split-polygon-mode.d.ts +4 -3
- package/dist/edit-modes/split-polygon-mode.d.ts.map +1 -0
- package/dist/edit-modes/split-polygon-mode.js +3 -3
- package/dist/edit-modes/three-click-polygon-mode.d.ts +4 -3
- package/dist/edit-modes/three-click-polygon-mode.d.ts.map +1 -0
- package/dist/edit-modes/three-click-polygon-mode.js +4 -2
- package/dist/edit-modes/transform-mode.d.ts +4 -3
- package/dist/edit-modes/transform-mode.d.ts.map +1 -0
- package/dist/edit-modes/transform-mode.js +7 -4
- package/dist/edit-modes/translate-mode.d.ts +4 -3
- package/dist/edit-modes/translate-mode.d.ts.map +1 -0
- package/dist/edit-modes/translate-mode.js +6 -5
- package/dist/edit-modes/two-click-polygon-mode.d.ts +4 -3
- package/dist/edit-modes/two-click-polygon-mode.d.ts.map +1 -0
- package/dist/edit-modes/two-click-polygon-mode.js +4 -5
- package/dist/edit-modes/types.d.ts +3 -1
- package/dist/edit-modes/types.d.ts.map +1 -0
- package/dist/edit-modes/utils.d.ts +5 -3
- package/dist/edit-modes/utils.d.ts.map +1 -0
- package/dist/edit-modes/utils.js +5 -1
- package/dist/edit-modes/view-mode.d.ts +2 -1
- package/dist/edit-modes/view-mode.d.ts.map +1 -0
- package/dist/edit-modes/view-mode.js +1 -1
- package/dist/editable-layers/editable-geojson-layer.d.ts +10 -9
- package/dist/editable-layers/editable-geojson-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-geojson-layer.js +30 -28
- package/dist/editable-layers/editable-h3-cluster-layer.d.ts +3 -2
- package/dist/editable-layers/editable-h3-cluster-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-h3-cluster-layer.js +4 -5
- package/dist/editable-layers/editable-layer.d.ts +7 -4
- package/dist/editable-layers/editable-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-layer.js +8 -4
- package/dist/editable-layers/editable-path-layer.d.ts +14 -1
- package/dist/editable-layers/editable-path-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-path-layer.js +21 -13
- package/dist/editable-layers/elevated-edit-handle-layer.d.ts +1 -0
- package/dist/editable-layers/elevated-edit-handle-layer.d.ts.map +1 -0
- package/dist/editable-layers/junction-scatterplot-layer.d.ts +6 -3
- package/dist/editable-layers/junction-scatterplot-layer.d.ts.map +1 -0
- package/dist/editable-layers/selection-layer.d.ts +3 -1
- package/dist/editable-layers/selection-layer.d.ts.map +1 -0
- package/dist/editable-layers/selection-layer.js +4 -5
- package/dist/index.cjs +127 -45
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +60 -58
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -52
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/deck-renderer/deck-cache.d.ts +1 -0
- package/dist/lib/deck-renderer/deck-cache.d.ts.map +1 -0
- package/dist/lib/deck-renderer/deck-drawer.d.ts +2 -1
- package/dist/lib/deck-renderer/deck-drawer.d.ts.map +1 -0
- package/dist/lib/feature.d.ts +3 -2
- package/dist/lib/feature.d.ts.map +1 -0
- package/dist/lib/layer-mouse-event.d.ts +2 -1
- package/dist/lib/layer-mouse-event.d.ts.map +1 -0
- package/dist/lib/layers/junctions-layer.d.ts +4 -3
- package/dist/lib/layers/junctions-layer.d.ts.map +1 -0
- package/dist/lib/layers/junctions-layer.js +4 -4
- package/dist/lib/layers/segments-layer.d.ts +3 -2
- package/dist/lib/layers/segments-layer.d.ts.map +1 -0
- package/dist/lib/layers/segments-layer.js +4 -4
- package/dist/lib/layers/texts-layer.d.ts +3 -2
- package/dist/lib/layers/texts-layer.d.ts.map +1 -0
- package/dist/lib/layers/texts-layer.js +4 -4
- package/dist/lib/math.d.ts +2 -1
- package/dist/lib/math.d.ts.map +1 -0
- package/dist/lib/nebula-core.d.ts +2 -1
- package/dist/lib/nebula-core.d.ts.map +1 -0
- package/dist/lib/nebula-core.js +3 -3
- package/dist/lib/nebula-layer.d.ts +2 -1
- package/dist/lib/nebula-layer.d.ts.map +1 -0
- package/dist/lib/style.d.ts +1 -0
- package/dist/lib/style.d.ts.map +1 -0
- package/dist/mode-handlers/composite-mode-handler.d.ts +4 -3
- package/dist/mode-handlers/composite-mode-handler.d.ts.map +1 -0
- package/dist/mode-handlers/composite-mode-handler.js +1 -1
- package/dist/mode-handlers/draw-90degree-polygon-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-90degree-polygon-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-90degree-polygon-handler.js +2 -2
- package/dist/mode-handlers/draw-circle-by-bounding-box-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-circle-by-bounding-box-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-circle-by-bounding-box-handler.js +2 -2
- package/dist/mode-handlers/draw-circle-from-center-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-circle-from-center-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-circle-from-center-handler.js +1 -1
- package/dist/mode-handlers/draw-ellipse-by-bounding-box-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-ellipse-by-bounding-box-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-ellipse-by-bounding-box-handler.js +2 -2
- package/dist/mode-handlers/draw-ellipse-using-three-points-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-ellipse-using-three-points-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-ellipse-using-three-points-handler.js +2 -2
- package/dist/mode-handlers/draw-line-string-handler.d.ts +3 -2
- package/dist/mode-handlers/draw-line-string-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-line-string-handler.js +1 -1
- package/dist/mode-handlers/draw-point-handler.d.ts +3 -2
- package/dist/mode-handlers/draw-point-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-point-handler.js +1 -1
- package/dist/mode-handlers/draw-polygon-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-polygon-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-polygon-handler.js +1 -1
- package/dist/mode-handlers/draw-rectangle-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-rectangle-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-rectangle-handler.js +1 -1
- package/dist/mode-handlers/draw-rectangle-using-three-points-handler.d.ts +4 -3
- package/dist/mode-handlers/draw-rectangle-using-three-points-handler.d.ts.map +1 -0
- package/dist/mode-handlers/draw-rectangle-using-three-points-handler.js +2 -2
- package/dist/mode-handlers/duplicate-handler.d.ts +4 -3
- package/dist/mode-handlers/duplicate-handler.d.ts.map +1 -0
- package/dist/mode-handlers/duplicate-handler.js +1 -1
- package/dist/mode-handlers/elevation-handler.d.ts +5 -4
- package/dist/mode-handlers/elevation-handler.d.ts.map +1 -0
- package/dist/mode-handlers/elevation-handler.js +2 -2
- package/dist/mode-handlers/extrude-handler.d.ts +4 -3
- package/dist/mode-handlers/extrude-handler.d.ts.map +1 -0
- package/dist/mode-handlers/extrude-handler.js +3 -3
- package/dist/mode-handlers/mode-handler.d.ts +4 -3
- package/dist/mode-handlers/mode-handler.d.ts.map +1 -0
- package/dist/mode-handlers/mode-handler.js +1 -1
- package/dist/mode-handlers/modify-handler.d.ts +5 -4
- package/dist/mode-handlers/modify-handler.d.ts.map +1 -0
- package/dist/mode-handlers/modify-handler.js +2 -2
- package/dist/mode-handlers/rotate-handler.d.ts +4 -3
- package/dist/mode-handlers/rotate-handler.d.ts.map +1 -0
- package/dist/mode-handlers/rotate-handler.js +1 -1
- package/dist/mode-handlers/scale-handler.d.ts +4 -3
- package/dist/mode-handlers/scale-handler.d.ts.map +1 -0
- package/dist/mode-handlers/scale-handler.js +1 -1
- package/dist/mode-handlers/snappable-handler.d.ts +4 -3
- package/dist/mode-handlers/snappable-handler.d.ts.map +1 -0
- package/dist/mode-handlers/snappable-handler.js +1 -1
- package/dist/mode-handlers/split-polygon-handler.d.ts +3 -2
- package/dist/mode-handlers/split-polygon-handler.d.ts.map +1 -0
- package/dist/mode-handlers/split-polygon-handler.js +2 -2
- package/dist/mode-handlers/three-click-polygon-handler.d.ts +3 -2
- package/dist/mode-handlers/three-click-polygon-handler.d.ts.map +1 -0
- package/dist/mode-handlers/three-click-polygon-handler.js +1 -1
- package/dist/mode-handlers/translate-handler.d.ts +4 -3
- package/dist/mode-handlers/translate-handler.d.ts.map +1 -0
- package/dist/mode-handlers/translate-handler.js +1 -1
- package/dist/mode-handlers/two-click-polygon-handler.d.ts +3 -2
- package/dist/mode-handlers/two-click-polygon-handler.d.ts.map +1 -0
- package/dist/mode-handlers/two-click-polygon-handler.js +1 -1
- package/dist/mode-handlers/view-handler.d.ts +3 -2
- package/dist/mode-handlers/view-handler.d.ts.map +1 -0
- package/dist/mode-handlers/view-handler.js +1 -1
- package/dist/shaderlib/color/color.d.ts +13 -2
- package/dist/shaderlib/color/color.d.ts.map +1 -0
- package/dist/shaderlib/color/color.js +25 -18
- package/dist/shaderlib/utils/utils.d.ts +1 -0
- package/dist/shaderlib/utils/utils.d.ts.map +1 -0
- package/dist/utils/curve-utils.d.ts +1 -0
- package/dist/utils/curve-utils.d.ts.map +1 -0
- package/dist/utils/geojson-types.d.ts +1 -0
- package/dist/utils/geojson-types.d.ts.map +1 -0
- package/dist/utils/memoize.d.ts +1 -0
- package/dist/utils/memoize.d.ts.map +1 -0
- package/dist/utils/translate-from-center.d.ts +1 -0
- package/dist/utils/translate-from-center.d.ts.map +1 -0
- package/dist/utils/translate-from-center.js +4 -4
- package/dist/utils/types.d.ts +1 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/utils.d.ts +5 -4
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +4 -4
- package/package.json +11 -10
- package/src/edit-modes/delete-mode.ts +28 -0
- package/src/edit-modes/draw-circle-by-diameter-mode.ts +4 -0
- package/src/edit-modes/draw-circle-from-center-mode.ts +4 -0
- package/src/edit-modes/draw-ellipse-by-bounding-box-mode.ts +10 -1
- package/src/edit-modes/draw-ellipse-using-three-points-mode.ts +11 -1
- package/src/edit-modes/extend-line-string-mode.ts +4 -0
- package/src/edit-modes/extrude-mode.ts +6 -1
- package/src/edit-modes/geojson-edit-mode.ts +9 -4
- package/src/edit-modes/measure-distance-mode.ts +1 -1
- package/src/edit-modes/modify-mode.ts +6 -1
- package/src/edit-modes/resize-circle-mode.ts +1 -0
- package/src/edit-modes/rotate-mode.ts +2 -1
- package/src/edit-modes/scale-mode.ts +2 -1
- package/src/edit-modes/split-polygon-mode.ts +4 -2
- package/src/edit-modes/three-click-polygon-mode.ts +7 -1
- package/src/edit-modes/transform-mode.ts +4 -0
- package/src/edit-modes/translate-mode.ts +4 -2
- package/src/edit-modes/two-click-polygon-mode.ts +3 -4
- package/src/edit-modes/types.ts +1 -0
- package/src/edit-modes/utils.ts +10 -3
- package/src/editable-layers/editable-geojson-layer.ts +6 -4
- package/src/editable-layers/editable-h3-cluster-layer.ts +1 -1
- package/src/editable-layers/editable-layer.ts +12 -4
- package/src/editable-layers/editable-path-layer.ts +29 -15
- package/src/editable-layers/junction-scatterplot-layer.ts +4 -2
- package/src/editable-layers/selection-layer.ts +2 -1
- package/src/index.ts +2 -0
- package/src/mode-handlers/split-polygon-handler.ts +2 -1
- package/src/shaderlib/color/color.ts +34 -20
- package/src/utils/translate-from-center.ts +5 -5
- package/src/utils/utils.ts +4 -4
package/dist/constants.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,QAAQ,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,IAAI;;;;CAIhB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FeatureCollection } from
|
|
2
|
-
import { ModeProps, ClickEvent, PointerMoveEvent, StartDraggingEvent, StopDraggingEvent, DraggingEvent, GuideFeatureCollection } from
|
|
3
|
-
import { GeoJsonEditMode } from
|
|
1
|
+
import { FeatureCollection } from "../utils/geojson-types.js";
|
|
2
|
+
import { ModeProps, ClickEvent, PointerMoveEvent, StartDraggingEvent, StopDraggingEvent, DraggingEvent, GuideFeatureCollection } from "./types.js";
|
|
3
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
4
4
|
export declare class CompositeMode extends GeoJsonEditMode {
|
|
5
5
|
_modes: Array<GeoJsonEditMode>;
|
|
6
6
|
constructor(modes: Array<GeoJsonEditMode>);
|
|
@@ -12,3 +12,4 @@ export declare class CompositeMode extends GeoJsonEditMode {
|
|
|
12
12
|
handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>): void;
|
|
13
13
|
getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection;
|
|
14
14
|
}
|
|
15
|
+
//# sourceMappingURL=composite-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composite-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/composite-mode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,iBAAiB,EAAC,kCAA+B;AACzD,OAAO,EACL,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EAEvB,mBAAgB;AACjB,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,aAAc,SAAQ,eAAe;IAChD,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;gBAEnB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC;IAKzC,SAAS,CAAC,CAAC,EACT,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,CAAC,EACtC,UAAU,GAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,IAAW,GAClE,CAAC;IAcJ,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAIzE,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAIrF,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAIzF,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAIvF,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAI/E,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,sBAAsB;CAevE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// deck.gl-community
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { GeoJsonEditMode } from
|
|
4
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
5
5
|
export class CompositeMode extends GeoJsonEditMode {
|
|
6
6
|
_modes;
|
|
7
7
|
constructor(modes) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FeatureCollection } from "../utils/geojson-types.js";
|
|
2
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
3
|
+
import { ClickEvent, ModeProps } from "./types.js";
|
|
4
|
+
export declare class DeleteMode extends GeoJsonEditMode {
|
|
5
|
+
handleClick(_event: ClickEvent, props: ModeProps<FeatureCollection>): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=delete-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/delete-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,kCAA+B;AAEzD,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,mBAAgB;AAC9C,qBAAa,UAAW,SAAQ,eAAe;IAC7C,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;CAsB3E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
2
|
+
export class DeleteMode extends GeoJsonEditMode {
|
|
3
|
+
handleClick(_event, props) {
|
|
4
|
+
const selectedFeatureIndexes = props.lastPointerMoveEvent.picks.map((pick) => pick.index);
|
|
5
|
+
if (selectedFeatureIndexes.length > 0) {
|
|
6
|
+
const indexToDelete = selectedFeatureIndexes[0];
|
|
7
|
+
const features = props.data.features.filter((_, index) => index !== indexToDelete);
|
|
8
|
+
const updatedData = {
|
|
9
|
+
...props.data,
|
|
10
|
+
features
|
|
11
|
+
};
|
|
12
|
+
const editAction = {
|
|
13
|
+
updatedData,
|
|
14
|
+
editType: 'deleteFeature',
|
|
15
|
+
editContext: {
|
|
16
|
+
featureIndexes: selectedFeatureIndexes
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
props.onEdit(editAction);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, TentativeFeature } from
|
|
2
|
-
import { Position, FeatureCollection } from
|
|
3
|
-
import { GeoJsonEditMode } from
|
|
1
|
+
import { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, TentativeFeature } from "./types.js";
|
|
2
|
+
import { Position, FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
4
4
|
export declare class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
5
5
|
createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature;
|
|
6
6
|
getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection;
|
|
@@ -9,3 +9,4 @@ export declare class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
9
9
|
finalizedCoordinates(coords: Position[]): Position[][];
|
|
10
10
|
getIntermediatePoint(coordinates: Position[]): Position | null;
|
|
11
11
|
}
|
|
12
|
+
//# sourceMappingURL=draw-90degree-polygon-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-90degree-polygon-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-90degree-polygon-mode.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EACjB,mBAAgB;AACjB,OAAO,EAAsB,QAAQ,EAAE,iBAAiB,EAAC,kCAA+B;AACxF,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,sBAAsB,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,gBAAgB;IA6C7E,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,sBAAsB;IAyBtE,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAK9E,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IA8DlE,oBAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE;IAmBvC,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,QAAQ,GAAG,IAAI;CA0C/D"}
|
|
@@ -6,8 +6,8 @@ import bearing from '@turf/bearing';
|
|
|
6
6
|
import lineIntersect from '@turf/line-intersect';
|
|
7
7
|
import turfDistance from '@turf/distance';
|
|
8
8
|
import { point, lineString as turfLineString } from '@turf/helpers';
|
|
9
|
-
import { generatePointsParallelToLinePoints, getPickedEditHandle, getEditHandlesForGeometry } from
|
|
10
|
-
import { GeoJsonEditMode } from
|
|
9
|
+
import { generatePointsParallelToLinePoints, getPickedEditHandle, getEditHandlesForGeometry } from "./utils.js";
|
|
10
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
11
11
|
export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
12
12
|
createTentativeFeature(props) {
|
|
13
13
|
const clickSequence = this.getClickSequence();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ModeProps, Tooltip } from
|
|
2
|
-
import { Position, Polygon, FeatureOf, FeatureCollection } from
|
|
3
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { ModeProps, Tooltip } from "./types.js";
|
|
2
|
+
import { Position, Polygon, FeatureOf, FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
4
4
|
export declare class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
5
5
|
radius: number | null | undefined;
|
|
6
6
|
position: Position;
|
|
@@ -22,3 +22,4 @@ export declare class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
|
22
22
|
*/
|
|
23
23
|
_getTooltips: (args: any) => any;
|
|
24
24
|
}
|
|
25
|
+
//# sourceMappingURL=draw-circle-by-diameter-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-circle-by-diameter-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-circle-by-diameter-mode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAC,mBAAgB;AAC3C,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAC,kCAA+B;AAEvF,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC/D,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAQ;IACzC,QAAQ,EAAE,QAAQ,CAAS;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAQ;IAC7C,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAQ;IAC3C,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;IAgC3F;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE;IAS3D;;;;;;OAMG;IACH,YAAY,qBAuBT;CACJ"}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
import circle from '@turf/circle';
|
|
5
5
|
import distance from '@turf/distance';
|
|
6
6
|
import area from '@turf/area';
|
|
7
|
-
import { memoize } from
|
|
8
|
-
import { getIntermediatePosition } from
|
|
9
|
-
import { TwoClickPolygonMode } from
|
|
7
|
+
import { memoize } from "../utils/memoize.js";
|
|
8
|
+
import { getIntermediatePosition } from "./geojson-edit-mode.js";
|
|
9
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
10
10
|
export class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
11
11
|
radius = null;
|
|
12
12
|
position = null;
|
|
@@ -30,6 +30,10 @@ export class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
|
30
30
|
const geometry = circle(centerCoordinates, this.radius, options);
|
|
31
31
|
geometry.properties = geometry.properties || {};
|
|
32
32
|
geometry.properties.shape = 'Circle';
|
|
33
|
+
geometry.properties.editProperties = geometry.properties.editProperties || {};
|
|
34
|
+
geometry.properties.editProperties.shape = 'Circle';
|
|
35
|
+
geometry.properties.editProperties.radius = { value: this.radius, unit: 'kilometers' };
|
|
36
|
+
geometry.properties.editProperties.center = centerCoordinates;
|
|
33
37
|
// calculate area of circle with turf function
|
|
34
38
|
this.areaCircle = area(geometry);
|
|
35
39
|
// @ts-expect-error turf types diff
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ModeProps, Tooltip } from
|
|
2
|
-
import { Position, Polygon, FeatureOf, FeatureCollection } from
|
|
3
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { ModeProps, Tooltip } from "./types.js";
|
|
2
|
+
import { Position, Polygon, FeatureOf, FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
4
4
|
export declare class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
5
5
|
radius: number | null | undefined;
|
|
6
6
|
position: Position;
|
|
@@ -20,3 +20,4 @@ export declare class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
|
20
20
|
*/
|
|
21
21
|
_getTooltips: (args: any) => any;
|
|
22
22
|
}
|
|
23
|
+
//# sourceMappingURL=draw-circle-from-center-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-circle-from-center-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-circle-from-center-mode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAC,mBAAgB;AAC3C,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAC,kCAA+B;AACvF,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC/D,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAQ;IACzC,QAAQ,EAAE,QAAQ,CAAS;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAQ;IAC7C,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;IA4B3F;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE;IAQ3D;;;;;OAKG;IACH,YAAY,qBAsBT;CACJ"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import circle from '@turf/circle';
|
|
5
5
|
import distance from '@turf/distance';
|
|
6
6
|
import area from '@turf/area';
|
|
7
|
-
import { memoize } from
|
|
8
|
-
import { TwoClickPolygonMode } from
|
|
7
|
+
import { memoize } from "../utils/memoize.js";
|
|
8
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
9
9
|
export class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
10
10
|
radius = null;
|
|
11
11
|
position = null;
|
|
@@ -25,6 +25,10 @@ export class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
|
25
25
|
const geometry = circle(coord1, this.radius, options);
|
|
26
26
|
geometry.properties = geometry.properties || {};
|
|
27
27
|
geometry.properties.shape = 'Circle';
|
|
28
|
+
geometry.properties.editProperties = geometry.properties.editProperties || {};
|
|
29
|
+
geometry.properties.editProperties.shape = 'Circle';
|
|
30
|
+
geometry.properties.editProperties.radius = { value: this.radius, unit: 'kilometers' };
|
|
31
|
+
geometry.properties.editProperties.center = coord1;
|
|
28
32
|
// calculate area of circle with turf function
|
|
29
33
|
this.areaCircle = area(geometry);
|
|
30
34
|
// @ts-expect-error turf types diff
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawEllipseByBoundingBoxMode extends TwoClickPolygonMode {
|
|
4
4
|
getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon>;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-ellipse-by-bounding-box-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-ellipse-by-bounding-box-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-ellipse-by-bounding-box-mode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AAEpE,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,4BAA6B,SAAQ,mBAAmB;IACnE,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;CAwB5F"}
|
|
@@ -5,8 +5,8 @@ import bboxPolygon from '@turf/bbox-polygon';
|
|
|
5
5
|
import distance from '@turf/distance';
|
|
6
6
|
import ellipse from '@turf/ellipse';
|
|
7
7
|
import { point } from '@turf/helpers';
|
|
8
|
-
import { getIntermediatePosition } from
|
|
9
|
-
import { TwoClickPolygonMode } from
|
|
8
|
+
import { getIntermediatePosition } from "./geojson-edit-mode.js";
|
|
9
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
10
10
|
export class DrawEllipseByBoundingBoxMode extends TwoClickPolygonMode {
|
|
11
11
|
getTwoClickPolygon(coord1, coord2, modeConfig) {
|
|
12
12
|
const minX = Math.min(coord1[0], coord2[0]);
|
|
@@ -17,7 +17,15 @@ export class DrawEllipseByBoundingBoxMode extends TwoClickPolygonMode {
|
|
|
17
17
|
const centerCoordinates = getIntermediatePosition(coord1, coord2);
|
|
18
18
|
const xSemiAxis = Math.max(distance(point(polygonPoints[0]), point(polygonPoints[1])), 0.001);
|
|
19
19
|
const ySemiAxis = Math.max(distance(point(polygonPoints[0]), point(polygonPoints[3])), 0.001);
|
|
20
|
+
const geometry = ellipse(centerCoordinates, xSemiAxis, ySemiAxis);
|
|
21
|
+
geometry.properties = geometry.properties || {};
|
|
22
|
+
geometry.properties.editProperties = geometry.properties.editProperties || {};
|
|
23
|
+
geometry.properties.editProperties.shape = 'Ellipse';
|
|
24
|
+
geometry.properties.editProperties.xSemiAxis = { value: xSemiAxis, unit: 'kilometers' };
|
|
25
|
+
geometry.properties.editProperties.ySemiAxis = { value: ySemiAxis, unit: 'kilometers' };
|
|
26
|
+
geometry.properties.editProperties.angle = 0;
|
|
27
|
+
geometry.properties.editProperties.center = centerCoordinates;
|
|
20
28
|
// @ts-expect-error fix return types
|
|
21
|
-
return
|
|
29
|
+
return geometry;
|
|
22
30
|
}
|
|
23
31
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { ThreeClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { ThreeClickPolygonMode } from "./three-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawEllipseUsingThreePointsMode extends ThreeClickPolygonMode {
|
|
4
4
|
getThreeClickPolygon(coord1: Position, coord2: Position, coord3: Position, modeConfig: any): FeatureOf<Polygon> | null | undefined;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-ellipse-using-three-points-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-ellipse-using-three-points-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-ellipse-using-three-points-mode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AAEpE,OAAO,EAAC,qBAAqB,EAAC,sCAAmC;AAEjE,qBAAa,+BAAgC,SAAQ,qBAAqB;IACxE,oBAAoB,CAClB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,UAAU,EAAE,GAAG,GACd,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS;CAkBzC"}
|
|
@@ -5,8 +5,8 @@ import distance from '@turf/distance';
|
|
|
5
5
|
import ellipse from '@turf/ellipse';
|
|
6
6
|
import bearing from '@turf/bearing';
|
|
7
7
|
import { point } from '@turf/helpers';
|
|
8
|
-
import { getIntermediatePosition } from
|
|
9
|
-
import { ThreeClickPolygonMode } from
|
|
8
|
+
import { getIntermediatePosition } from "./geojson-edit-mode.js";
|
|
9
|
+
import { ThreeClickPolygonMode } from "./three-click-polygon-mode.js";
|
|
10
10
|
export class DrawEllipseUsingThreePointsMode extends ThreeClickPolygonMode {
|
|
11
11
|
getThreeClickPolygon(coord1, coord2, coord3, modeConfig) {
|
|
12
12
|
const centerCoordinates = getIntermediatePosition(coord1, coord2);
|
|
@@ -14,6 +14,15 @@ export class DrawEllipseUsingThreePointsMode extends ThreeClickPolygonMode {
|
|
|
14
14
|
const ySemiAxis = Math.max(distance(coord1, coord2), 0.001) / 2;
|
|
15
15
|
const options = { angle: bearing(coord1, coord2) };
|
|
16
16
|
// @ts-expect-error fix return types
|
|
17
|
-
|
|
17
|
+
const geometry = ellipse(centerCoordinates, xSemiAxis, ySemiAxis, options);
|
|
18
|
+
geometry.properties = geometry.properties || {};
|
|
19
|
+
geometry.properties.editProperties = geometry.properties.editProperties || {};
|
|
20
|
+
geometry.properties.editProperties.shape = 'Ellipse';
|
|
21
|
+
geometry.properties.editProperties.xSemiAxis = { value: xSemiAxis, unit: 'kilometers' };
|
|
22
|
+
geometry.properties.editProperties.ySemiAxis = { value: ySemiAxis, unit: 'kilometers' };
|
|
23
|
+
geometry.properties.editProperties.angle = options.angle;
|
|
24
|
+
geometry.properties.editProperties.center = centerCoordinates;
|
|
25
|
+
// @ts-expect-error fix return types
|
|
26
|
+
return geometry;
|
|
18
27
|
}
|
|
19
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FeatureCollection, Position } from
|
|
2
|
-
import { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, Tooltip } from
|
|
3
|
-
import { GeoJsonEditMode } from
|
|
1
|
+
import { FeatureCollection, Position } from "../utils/geojson-types.js";
|
|
2
|
+
import { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, Tooltip } from "./types.js";
|
|
3
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
4
4
|
export declare class DrawLineStringMode extends GeoJsonEditMode {
|
|
5
5
|
dist: number;
|
|
6
6
|
position: Position;
|
|
@@ -23,3 +23,4 @@ export declare class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
23
23
|
*/
|
|
24
24
|
_getTooltips: (args: any) => any;
|
|
25
25
|
}
|
|
26
|
+
//# sourceMappingURL=draw-line-string-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-line-string-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-line-string-mode.ts"],"names":[],"mappings":"AAMA,OAAO,EAAa,iBAAiB,EAAE,QAAQ,EAAC,kCAA+B;AAC/E,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EAEtB,OAAO,EACR,mBAAgB;AAEjB,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,kBAAmB,SAAQ,eAAe;IAErD,IAAI,SAAK;IACT,QAAQ,EAAE,QAAQ,CAAS;IAC3B,KAAK,EAAE,QAAQ,EAAE,CAAM;IACvB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAkDlE,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IA0BrE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,sBAAsB;IA+CtE,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAI9E;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE;IAQ3D,iBAAiB,CAAC,aAAa,KAAA;IAc/B;;;;OAIG;IACH,YAAY,qBAoBT;CACJ"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import distance from '@turf/distance';
|
|
5
|
-
import { memoize } from
|
|
6
|
-
import { getPickedEditHandle } from
|
|
7
|
-
import { GeoJsonEditMode } from
|
|
5
|
+
import { memoize } from "../utils/memoize.js";
|
|
6
|
+
import { getPickedEditHandle } from "./utils.js";
|
|
7
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
8
8
|
export class DrawLineStringMode extends GeoJsonEditMode {
|
|
9
9
|
// declaration of variables for the calculation of the distance of linestring
|
|
10
10
|
dist = 0;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ClickEvent, PointerMoveEvent, ModeProps, TentativeFeature } from
|
|
2
|
-
import { FeatureCollection } from
|
|
3
|
-
import { GeoJsonEditMode } from
|
|
1
|
+
import { ClickEvent, PointerMoveEvent, ModeProps, TentativeFeature } from "./types.js";
|
|
2
|
+
import { FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
4
4
|
export declare class DrawPointMode extends GeoJsonEditMode {
|
|
5
5
|
createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature;
|
|
6
6
|
handleClick({ mapCoords }: ClickEvent, props: ModeProps<FeatureCollection>): void;
|
|
7
7
|
handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void;
|
|
8
8
|
}
|
|
9
|
+
//# sourceMappingURL=draw-point-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-point-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-point-mode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAC,mBAAgB;AAClF,OAAO,EAAC,iBAAiB,EAAQ,kCAA+B;AAChE,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,aAAc,SAAQ,eAAe;IAChD,sBAAsB,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,gBAAgB;IAgB7E,WAAW,CAAC,EAAC,SAAS,EAAC,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAS/E,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;CAI/E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// deck.gl-community
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { GeoJsonEditMode } from
|
|
4
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
5
5
|
export class DrawPointMode extends GeoJsonEditMode {
|
|
6
6
|
createTentativeFeature(props) {
|
|
7
7
|
const { lastPointerMoveEvent } = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClickEvent, StartDraggingEvent, StopDraggingEvent, DraggingEvent, ModeProps } from
|
|
2
|
-
import { FeatureCollection } from
|
|
3
|
-
import { DrawPolygonMode } from
|
|
1
|
+
import { ClickEvent, StartDraggingEvent, StopDraggingEvent, DraggingEvent, ModeProps } from "./types.js";
|
|
2
|
+
import { FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { DrawPolygonMode } from "./draw-polygon-mode.js";
|
|
4
4
|
type DraggingHandler = (event: DraggingEvent, props: ModeProps<FeatureCollection>) => void;
|
|
5
5
|
export declare class DrawPolygonByDraggingMode extends DrawPolygonMode {
|
|
6
6
|
handleDraggingThrottled: DraggingHandler | null | undefined;
|
|
@@ -12,3 +12,4 @@ export declare class DrawPolygonByDraggingMode extends DrawPolygonMode {
|
|
|
12
12
|
handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>): void;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
15
|
+
//# sourceMappingURL=draw-polygon-by-dragging-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-polygon-by-dragging-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-polygon-by-dragging-mode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,aAAa,EAAE,SAAS,EAAC,mBAAgB;AACpG,OAAO,EAAU,iBAAiB,EAAC,kCAA+B;AAElE,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;AAE3F,qBAAa,yBAA0B,SAAQ,eAAe;IAC5D,uBAAuB,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAQ;IAEnE,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAIlE,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAWlF,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAwBhF,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAiB3E,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAMxE,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;CA4BtE"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import throttle from 'lodash.throttle';
|
|
5
|
-
import { getPickedEditHandle } from
|
|
6
|
-
import { DrawPolygonMode } from
|
|
5
|
+
import { getPickedEditHandle } from "./utils.js";
|
|
6
|
+
import { DrawPolygonMode } from "./draw-polygon-mode.js";
|
|
7
7
|
export class DrawPolygonByDraggingMode extends DrawPolygonMode {
|
|
8
8
|
handleDraggingThrottled = null;
|
|
9
9
|
handleClick(event, props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, TentativeFeature } from
|
|
2
|
-
import { FeatureCollection } from
|
|
3
|
-
import { GeoJsonEditMode } from
|
|
1
|
+
import { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, TentativeFeature } from "./types.js";
|
|
2
|
+
import { FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
4
4
|
export declare class DrawPolygonMode extends GeoJsonEditMode {
|
|
5
5
|
createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature;
|
|
6
6
|
getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection;
|
|
@@ -8,3 +8,4 @@ export declare class DrawPolygonMode extends GeoJsonEditMode {
|
|
|
8
8
|
handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>): void;
|
|
9
9
|
handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void;
|
|
10
10
|
}
|
|
11
|
+
//# sourceMappingURL=draw-polygon-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-polygon-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-polygon-mode.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EAEjB,mBAAgB;AACjB,OAAO,EAAU,iBAAiB,EAAC,kCAA+B;AAElE,OAAO,EAAC,eAAe,EAAC,+BAA4B;AAEpD,qBAAa,eAAgB,SAAQ,eAAe;IAClD,sBAAsB,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,gBAAgB;IAkC7E,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,sBAAsB;IAiCtE,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IA2DlE,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IA0BrE,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;CAI/E"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import lineIntersect from '@turf/line-intersect';
|
|
5
5
|
import { lineString as turfLineString } from '@turf/helpers';
|
|
6
|
-
import { getPickedEditHandle } from
|
|
7
|
-
import { GeoJsonEditMode } from
|
|
6
|
+
import { getPickedEditHandle } from "./utils.js";
|
|
7
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
8
8
|
export class DrawPolygonMode extends GeoJsonEditMode {
|
|
9
9
|
createTentativeFeature(props) {
|
|
10
10
|
const { lastPointerMoveEvent } = props;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawRectangleFromCenterMode extends TwoClickPolygonMode {
|
|
4
4
|
getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon>;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-rectangle-from-center-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-rectangle-from-center-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-rectangle-from-center-mode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AACpE,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,2BAA4B,SAAQ,mBAAmB;IAClE,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;CAiB5F"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import bboxPolygon from '@turf/bbox-polygon';
|
|
5
|
-
import { TwoClickPolygonMode } from
|
|
5
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
6
6
|
export class DrawRectangleFromCenterMode extends TwoClickPolygonMode {
|
|
7
7
|
getTwoClickPolygon(coord1, coord2, modeConfig) {
|
|
8
8
|
const longitude = coord1[0] > coord2[0]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawRectangleMode extends TwoClickPolygonMode {
|
|
4
4
|
getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon>;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-rectangle-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-rectangle-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-rectangle-mode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AACpE,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,iBAAkB,SAAQ,mBAAmB;IACxD,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;CAQ5F"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import bboxPolygon from '@turf/bbox-polygon';
|
|
5
|
-
import { TwoClickPolygonMode } from
|
|
5
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
6
6
|
export class DrawRectangleMode extends TwoClickPolygonMode {
|
|
7
7
|
getTwoClickPolygon(coord1, coord2, modeConfig) {
|
|
8
8
|
const rectangle = bboxPolygon([coord1[0], coord1[1], coord2[0], coord2[1]]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { ThreeClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { ThreeClickPolygonMode } from "./three-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawRectangleUsingThreePointsMode extends ThreeClickPolygonMode {
|
|
4
4
|
getThreeClickPolygon(coord1: Position, coord2: Position, coord3: Position, modeConfig: any): FeatureOf<Polygon> | null | undefined;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-rectangle-using-three-points-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-rectangle-using-three-points-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-rectangle-using-three-points-mode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AACpE,OAAO,EAAC,qBAAqB,EAAC,sCAAmC;AAEjE,qBAAa,iCAAkC,SAAQ,qBAAqB;IAC1E,oBAAoB,CAClB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,UAAU,EAAE,GAAG,GACd,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS;CAyBzC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// deck.gl-community
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { generatePointsParallelToLinePoints } from
|
|
5
|
-
import { ThreeClickPolygonMode } from
|
|
4
|
+
import { generatePointsParallelToLinePoints } from "./utils.js";
|
|
5
|
+
import { ThreeClickPolygonMode } from "./three-click-polygon-mode.js";
|
|
6
6
|
export class DrawRectangleUsingThreePointsMode extends ThreeClickPolygonMode {
|
|
7
7
|
getThreeClickPolygon(coord1, coord2, coord3, modeConfig) {
|
|
8
8
|
const [p3, p4] = generatePointsParallelToLinePoints(coord1, coord2, coord3);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawSquareFromCenterMode extends TwoClickPolygonMode {
|
|
4
4
|
getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon>;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-square-from-center-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-square-from-center-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-square-from-center-mode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AACpE,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC/D,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;CAqC5F"}
|
|
@@ -5,7 +5,7 @@ import bboxPolygon from '@turf/bbox-polygon';
|
|
|
5
5
|
import turfDistance from '@turf/distance';
|
|
6
6
|
import turfAlong from '@turf/along';
|
|
7
7
|
import { point, lineString as turfLineString } from '@turf/helpers';
|
|
8
|
-
import { TwoClickPolygonMode } from
|
|
8
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
9
9
|
export class DrawSquareFromCenterMode extends TwoClickPolygonMode {
|
|
10
10
|
getTwoClickPolygon(coord1, coord2, modeConfig) {
|
|
11
11
|
// get the coordinates of the other two rectangle vertices
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Position, Polygon, FeatureOf } from
|
|
2
|
-
import { TwoClickPolygonMode } from
|
|
1
|
+
import { Position, Polygon, FeatureOf } from "../utils/geojson-types.js";
|
|
2
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
3
3
|
export declare class DrawSquareMode extends TwoClickPolygonMode {
|
|
4
4
|
getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon>;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=draw-square-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw-square-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/draw-square-mode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAC,kCAA+B;AACpE,OAAO,EAAC,mBAAmB,EAAC,oCAAiC;AAE7D,qBAAa,cAAe,SAAQ,mBAAmB;IACrD,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC;CA2B5F"}
|
|
@@ -5,7 +5,7 @@ import bboxPolygon from '@turf/bbox-polygon';
|
|
|
5
5
|
import turfDistance from '@turf/distance';
|
|
6
6
|
import turfAlong from '@turf/along';
|
|
7
7
|
import { point, lineString as turfLineString } from '@turf/helpers';
|
|
8
|
-
import { TwoClickPolygonMode } from
|
|
8
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
9
9
|
export class DrawSquareMode extends TwoClickPolygonMode {
|
|
10
10
|
getTwoClickPolygon(coord1, coord2, modeConfig) {
|
|
11
11
|
// get the coordinates of the other two rectangle vertices
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { StartDraggingEvent, ModeProps } from
|
|
2
|
-
import { FeatureCollection } from
|
|
3
|
-
import { TranslateMode } from
|
|
1
|
+
import { StartDraggingEvent, ModeProps } from "./types.js";
|
|
2
|
+
import { FeatureCollection } from "../utils/geojson-types.js";
|
|
3
|
+
import { TranslateMode } from "./translate-mode.js";
|
|
4
4
|
export declare class DuplicateMode extends TranslateMode {
|
|
5
5
|
handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>): void;
|
|
6
6
|
updateCursor(props: ModeProps<FeatureCollection>): void;
|
|
7
7
|
}
|
|
8
|
+
//# sourceMappingURL=duplicate-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/duplicate-mode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAE,SAAS,EAAC,mBAAgB;AACtD,OAAO,EAAC,iBAAiB,EAAC,kCAA+B;AACzD,OAAO,EAAC,aAAa,EAAC,4BAAyB;AAE/C,qBAAa,aAAc,SAAQ,aAAa;IAC9C,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;IAQlF,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC;CAOjD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// deck.gl-community
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { TranslateMode } from
|
|
4
|
+
import { TranslateMode } from "./translate-mode.js";
|
|
5
5
|
export class DuplicateMode extends TranslateMode {
|
|
6
6
|
handleStartDragging(event, props) {
|
|
7
7
|
super.handleStartDragging(event, props);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEvent, PointerMoveEvent, StartDraggingEvent, StopDraggingEvent, DraggingEvent, Tooltip, ModeProps } from
|
|
1
|
+
import { ClickEvent, PointerMoveEvent, StartDraggingEvent, StopDraggingEvent, DraggingEvent, Tooltip, ModeProps } from "./types.js";
|
|
2
2
|
export interface EditMode<TData, TGuides> {
|
|
3
3
|
handleClick(event: ClickEvent, props: ModeProps<TData>): void;
|
|
4
4
|
handlePointerMove(event: PointerMoveEvent, props: ModeProps<TData>): void;
|
|
@@ -9,3 +9,4 @@ export interface EditMode<TData, TGuides> {
|
|
|
9
9
|
getGuides(props: ModeProps<TData>): TGuides | undefined;
|
|
10
10
|
getTooltips(props: ModeProps<TData>): Tooltip[];
|
|
11
11
|
}
|
|
12
|
+
//# sourceMappingURL=edit-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-mode.d.ts","sourceRoot":"","sources":["../../src/edit-modes/edit-mode.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,SAAS,EACV,mBAAgB;AAEjB,MAAM,WAAW,QAAQ,CAAC,KAAK,EAAE,OAAO;IAEtC,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAE9D,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAE1E,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAE9E,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAE5E,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAEpE,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAEjE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,SAAS,CAAC;IAExD,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,OAAO,EAAE,CAAC;CACjD"}
|