@deck.gl-community/editable-layers 9.0.0-alpha.1 → 9.0.3
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/LICENSE +19 -0
- package/README.md +2 -81
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +4 -1
- 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 +5 -2
- 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 +30 -25
- 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 +9 -6
- 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 +8 -5
- 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 +5 -2
- 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 +5 -2
- 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 +21 -18
- 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 +8 -5
- 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 +12 -7
- 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 +22 -18
- 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 +4 -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 +4 -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 +10 -7
- 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 +4 -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 +4 -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 +4 -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/edit-mode.js +3 -1
- package/dist/edit-modes/elevation-mode.d.ts +5 -4
- package/dist/edit-modes/elevation-mode.d.ts.map +1 -0
- package/dist/edit-modes/elevation-mode.js +10 -7
- 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 +11 -8
- 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 +12 -9
- package/dist/edit-modes/geojson-edit-mode.d.ts +4 -3
- package/dist/edit-modes/geojson-edit-mode.d.ts.map +1 -0
- package/dist/edit-modes/geojson-edit-mode.js +20 -17
- package/dist/edit-modes/immutable-feature-collection.d.ts +3 -1
- package/dist/edit-modes/immutable-feature-collection.d.ts.map +1 -0
- package/dist/edit-modes/immutable-feature-collection.js +25 -20
- 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 +9 -9
- 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 +8 -6
- 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 +19 -16
- 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 +19 -16
- 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 +6 -4
- 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 +11 -8
- 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 +11 -8
- 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 +9 -6
- 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 +15 -12
- 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 +10 -7
- 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 +8 -5
- 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 +10 -7
- 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 +10 -7
- package/dist/edit-modes/types.d.ts +2 -1
- package/dist/edit-modes/types.d.ts.map +1 -0
- package/dist/edit-modes/types.js +3 -0
- package/dist/edit-modes/utils.d.ts +3 -2
- package/dist/edit-modes/utils.d.ts.map +1 -0
- package/dist/edit-modes/utils.js +22 -19
- 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 +4 -1
- package/dist/editable-layers/editable-geojson-layer.d.ts +7 -6
- package/dist/editable-layers/editable-geojson-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-geojson-layer.js +53 -52
- 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 +8 -5
- package/dist/editable-layers/editable-layer.d.ts +7 -6
- package/dist/editable-layers/editable-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-layer.js +18 -15
- package/dist/editable-layers/editable-path-layer.d.ts +2 -1
- package/dist/editable-layers/editable-path-layer.d.ts.map +1 -0
- package/dist/editable-layers/editable-path-layer.js +10 -7
- package/dist/editable-layers/elevated-edit-handle-layer.d.ts +2 -1
- package/dist/editable-layers/elevated-edit-handle-layer.d.ts.map +1 -0
- package/dist/editable-layers/elevated-edit-handle-layer.js +6 -3
- package/dist/editable-layers/junction-scatterplot-layer.d.ts +3 -2
- package/dist/editable-layers/junction-scatterplot-layer.d.ts.map +1 -0
- package/dist/editable-layers/junction-scatterplot-layer.js +10 -7
- package/dist/editable-layers/selection-layer.d.ts +2 -1
- package/dist/editable-layers/selection-layer.d.ts.map +1 -0
- package/dist/editable-layers/selection-layer.js +8 -5
- package/dist/index.cjs +70 -542
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +59 -59
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +56 -54
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +3 -0
- package/dist/lib/deck-renderer/deck-cache.d.ts +2 -1
- package/dist/lib/deck-renderer/deck-cache.d.ts.map +1 -0
- package/dist/lib/deck-renderer/deck-cache.js +1 -1
- package/dist/lib/deck-renderer/deck-drawer.d.ts +3 -3
- package/dist/lib/deck-renderer/deck-drawer.d.ts.map +1 -0
- package/dist/lib/deck-renderer/deck-drawer.js +12 -12
- package/dist/lib/feature.d.ts +5 -4
- package/dist/lib/feature.d.ts.map +1 -0
- package/dist/lib/feature.js +4 -1
- package/dist/lib/layer-mouse-event.d.ts +3 -2
- package/dist/lib/layer-mouse-event.d.ts.map +1 -0
- package/dist/lib/layer-mouse-event.js +4 -1
- package/dist/lib/layers/junctions-layer.d.ts +5 -4
- package/dist/lib/layers/junctions-layer.d.ts.map +1 -0
- package/dist/lib/layers/junctions-layer.js +10 -7
- package/dist/lib/layers/segments-layer.d.ts +5 -4
- package/dist/lib/layers/segments-layer.d.ts.map +1 -0
- package/dist/lib/layers/segments-layer.js +12 -9
- package/dist/lib/layers/texts-layer.d.ts +4 -3
- package/dist/lib/layers/texts-layer.d.ts.map +1 -0
- package/dist/lib/layers/texts-layer.js +9 -6
- package/dist/lib/math.d.ts +2 -1
- package/dist/lib/math.d.ts.map +1 -0
- package/dist/lib/math.js +3 -0
- package/dist/lib/{nebula.d.ts → nebula-core.d.ts} +3 -2
- package/dist/lib/nebula-core.d.ts.map +1 -0
- package/dist/lib/{nebula.js → nebula-core.js} +7 -4
- package/dist/lib/nebula-layer.d.ts +3 -2
- package/dist/lib/nebula-layer.d.ts.map +1 -0
- package/dist/lib/nebula-layer.js +4 -1
- package/dist/lib/style.d.ts +1 -0
- package/dist/lib/style.d.ts.map +1 -0
- package/dist/lib/style.js +5 -2
- 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 +13 -10
- 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 +5 -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 +4 -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 +5 -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 +7 -4
- 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 +8 -5
- 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 +5 -2
- 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 +10 -7
- 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 +4 -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 +12 -9
- 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 +4 -1
- package/dist/mode-handlers/elevation-handler.d.ts +6 -5
- package/dist/mode-handlers/elevation-handler.d.ts.map +1 -0
- package/dist/mode-handlers/elevation-handler.js +10 -7
- 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 +12 -9
- 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 +18 -15
- 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 +18 -15
- 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 +5 -2
- 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 +6 -3
- 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 +6 -3
- 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 +12 -9
- 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 +4 -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 +5 -2
- 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 +4 -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 +4 -1
- package/dist/shaderlib/color/color.d.ts +8 -6
- package/dist/shaderlib/color/color.d.ts.map +1 -0
- package/dist/shaderlib/color/color.js +7 -4
- package/dist/shaderlib/utils/utils.d.ts +3 -2
- package/dist/shaderlib/utils/utils.d.ts.map +1 -0
- package/dist/shaderlib/utils/utils.js +5 -2
- package/dist/{curve-utils.d.ts → utils/curve-utils.d.ts} +1 -0
- package/dist/utils/curve-utils.d.ts.map +1 -0
- package/dist/{curve-utils.js → utils/curve-utils.js} +7 -4
- package/dist/{geojson-types.d.ts → utils/geojson-types.d.ts} +3 -25
- package/dist/utils/geojson-types.d.ts.map +1 -0
- package/dist/utils/geojson-types.js +4 -0
- package/dist/{memoize.d.ts → utils/memoize.d.ts} +2 -1
- package/dist/utils/memoize.d.ts.map +1 -0
- package/dist/{memoize.js → utils/memoize.js} +4 -1
- package/dist/{translateFromCenter.d.ts → utils/translate-from-center.d.ts} +1 -0
- package/dist/utils/translate-from-center.d.ts.map +1 -0
- package/dist/{translateFromCenter.js → utils/translate-from-center.js} +7 -4
- package/dist/{types.d.ts → utils/types.d.ts} +1 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +4 -0
- package/dist/{utils.d.ts → utils/utils.d.ts} +5 -4
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/{utils.js → utils/utils.js} +11 -9
- package/package.json +11 -10
- package/src/constants.ts +5 -1
- package/src/edit-modes/composite-mode.ts +9 -5
- package/src/edit-modes/draw-90degree-polygon-mode.ts +38 -34
- package/src/edit-modes/draw-circle-by-diameter-mode.ts +16 -12
- package/src/edit-modes/draw-circle-from-center-mode.ts +15 -11
- package/src/edit-modes/draw-ellipse-by-bounding-box-mode.ts +8 -4
- package/src/edit-modes/draw-ellipse-using-three-points-mode.ts +9 -5
- package/src/edit-modes/draw-line-string-mode.ts +29 -25
- package/src/edit-modes/draw-point-mode.ts +13 -9
- package/src/edit-modes/draw-polygon-by-dragging-mode.ts +16 -16
- package/src/edit-modes/draw-polygon-mode.ts +28 -23
- package/src/edit-modes/draw-rectangle-from-center-mode.ts +6 -2
- package/src/edit-modes/draw-rectangle-mode.ts +6 -2
- package/src/edit-modes/draw-rectangle-using-three-points-mode.ts +12 -8
- package/src/edit-modes/draw-square-from-center-mode.ts +7 -3
- package/src/edit-modes/draw-square-mode.ts +7 -3
- package/src/edit-modes/duplicate-mode.ts +7 -3
- package/src/edit-modes/edit-mode.ts +5 -1
- package/src/edit-modes/elevation-mode.ts +13 -9
- package/src/edit-modes/extend-line-string-mode.ts +16 -12
- package/src/edit-modes/extrude-mode.ts +22 -18
- package/src/edit-modes/geojson-edit-mode.ts +37 -33
- package/src/edit-modes/immutable-feature-collection.ts +28 -22
- package/src/edit-modes/measure-angle-mode.ts +66 -59
- package/src/edit-modes/measure-area-mode.ts +13 -10
- package/src/edit-modes/measure-distance-mode.ts +37 -33
- package/src/edit-modes/modify-mode.ts +36 -32
- package/src/edit-modes/resize-circle-mode.ts +8 -5
- package/src/edit-modes/rotate-mode.ts +22 -18
- package/src/edit-modes/scale-mode.ts +29 -23
- package/src/edit-modes/snappable-mode.ts +19 -15
- package/src/edit-modes/split-polygon-mode.ts +25 -21
- package/src/edit-modes/three-click-polygon-mode.ts +15 -11
- package/src/edit-modes/transform-mode.ts +15 -11
- package/src/edit-modes/translate-mode.ts +15 -11
- package/src/edit-modes/two-click-polygon-mode.ts +15 -11
- package/src/edit-modes/types.ts +5 -1
- package/src/edit-modes/utils.ts +35 -30
- package/src/edit-modes/view-mode.ts +5 -1
- package/src/editable-layers/editable-geojson-layer.ts +44 -41
- package/src/editable-layers/editable-h3-cluster-layer.ts +17 -14
- package/src/editable-layers/editable-layer.ts +42 -32
- package/src/editable-layers/editable-path-layer.ts +12 -8
- package/src/editable-layers/elevated-edit-handle-layer.ts +11 -7
- package/src/editable-layers/junction-scatterplot-layer.ts +15 -11
- package/src/editable-layers/selection-layer.ts +11 -7
- package/src/index.ts +68 -65
- package/src/lib/constants.ts +4 -0
- package/src/lib/deck-renderer/deck-cache.ts +1 -1
- package/src/lib/deck-renderer/deck-drawer.ts +28 -28
- package/src/lib/feature.ts +7 -3
- package/src/lib/layer-mouse-event.ts +7 -6
- package/src/lib/layers/junctions-layer.ts +14 -10
- package/src/lib/layers/segments-layer.ts +24 -20
- package/src/lib/layers/texts-layer.ts +18 -14
- package/src/lib/math.ts +5 -1
- package/src/lib/{nebula.ts → nebula-core.ts} +8 -4
- package/src/lib/nebula-layer.ts +9 -5
- package/src/lib/style.ts +6 -2
- package/src/mode-handlers/composite-mode-handler.ts +6 -6
- package/src/mode-handlers/draw-90degree-polygon-handler.ts +22 -18
- package/src/mode-handlers/draw-circle-by-bounding-box-handler.ts +10 -6
- package/src/mode-handlers/draw-circle-from-center-handler.ts +10 -6
- package/src/mode-handlers/draw-ellipse-by-bounding-box-handler.ts +9 -5
- package/src/mode-handlers/draw-ellipse-using-three-points-handler.ts +12 -8
- package/src/mode-handlers/draw-line-string-handler.ts +12 -8
- package/src/mode-handlers/draw-point-handler.ts +9 -5
- package/src/mode-handlers/draw-polygon-handler.ts +16 -12
- package/src/mode-handlers/draw-rectangle-handler.ts +8 -4
- package/src/mode-handlers/draw-rectangle-using-three-points-handler.ts +17 -13
- package/src/mode-handlers/duplicate-handler.ts +8 -4
- package/src/mode-handlers/elevation-handler.ts +14 -10
- package/src/mode-handlers/extrude-handler.ts +15 -11
- package/src/mode-handlers/mode-handler.ts +26 -28
- package/src/mode-handlers/modify-handler.ts +29 -25
- package/src/mode-handlers/rotate-handler.ts +13 -17
- package/src/mode-handlers/scale-handler.ts +13 -13
- package/src/mode-handlers/snappable-handler.ts +28 -24
- package/src/mode-handlers/split-polygon-handler.ts +22 -18
- package/src/mode-handlers/three-click-polygon-handler.ts +6 -2
- package/src/mode-handlers/translate-handler.ts +12 -8
- package/src/mode-handlers/two-click-polygon-handler.ts +6 -2
- package/src/mode-handlers/view-handler.ts +7 -3
- package/src/shaderlib/color/color.ts +10 -5
- package/src/shaderlib/utils/utils.ts +6 -2
- package/src/{curve-utils.ts → utils/curve-utils.ts} +11 -7
- package/src/{geojson-types.ts → utils/geojson-types.ts} +16 -31
- package/src/{memoize.ts → utils/memoize.ts} +5 -1
- package/src/{translateFromCenter.ts → utils/translate-from-center.ts} +12 -8
- package/src/{types.ts → utils/types.ts} +4 -0
- package/src/{utils.ts → utils/utils.ts} +17 -14
- package/dist/editable-layers/path-marker-layer/arrow-2d-geometry.d.ts +0 -4
- package/dist/editable-layers/path-marker-layer/arrow-2d-geometry.js +0 -55
- package/dist/editable-layers/path-marker-layer/create-path-markers.d.ts +0 -16
- package/dist/editable-layers/path-marker-layer/create-path-markers.js +0 -75
- package/dist/editable-layers/path-marker-layer/path-marker-layer.d.ts +0 -40
- package/dist/editable-layers/path-marker-layer/path-marker-layer.js +0 -121
- package/dist/editable-layers/path-marker-layer/polyline.d.ts +0 -18
- package/dist/editable-layers/path-marker-layer/polyline.js +0 -37
- package/dist/editable-layers/path-outline-layer/path-outline-layer.d.ts +0 -26
- package/dist/editable-layers/path-outline-layer/path-outline-layer.js +0 -106
- package/dist/geojson-types.js +0 -2
- package/dist/shaderlib/outline/outline.d.ts +0 -8
- package/dist/shaderlib/outline/outline.js +0 -97
- package/dist/types.js +0 -1
- package/src/editable-layers/path-marker-layer/arrow-2d-geometry.ts +0 -61
- package/src/editable-layers/path-marker-layer/create-path-markers.ts +0 -107
- package/src/editable-layers/path-marker-layer/path-marker-layer.ts +0 -179
- package/src/editable-layers/path-marker-layer/polyline.ts +0 -40
- package/src/editable-layers/path-outline-layer/path-outline-layer.ts +0 -147
- package/src/shaderlib/outline/outline.ts +0 -101
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2020 vis.gl a Series of LF Projects, LLC
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,82 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
# @deck.gl-community/editable-layers
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](https://@deck.gl-community/editable-layers)
|
|
6
|
-
|
|
7
|
-
[@deck.gl-community/editable-layers](https://@deck.gl-community/editable-layers) provides editable and interactive map overlay layers, built using the power of [deck.gl](https://deck.gl/).
|
|
8
|
-
|
|
9
|
-
## Getting started
|
|
10
|
-
|
|
11
|
-
### Running the example
|
|
12
|
-
|
|
13
|
-
1. `git clone git@github.com:uber/@deck.gl-community/editable-layers.git`
|
|
14
|
-
2. `cd @deck.gl-community/editable-layers`
|
|
15
|
-
3. `yarn`
|
|
16
|
-
4. `cd examples/advanced`
|
|
17
|
-
5. `yarn`
|
|
18
|
-
6. `export MapboxAccessToken='<Add your key>'`
|
|
19
|
-
7. `yarn start-local`
|
|
20
|
-
8. You can now view and edit geometry.
|
|
21
|
-
|
|
22
|
-
### Installation
|
|
23
|
-
|
|
24
|
-
For npm
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install @deck.gl-community/editable-layers
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
For yarn
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
yarn add @deck.gl-community/editable-layers
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### `EditableGeoJsonLayer`
|
|
37
|
-
|
|
38
|
-
[EditableGeoJsonLayer](/docs/modules/editor-layers/api-reference/editable-geojson-layer.md) is implemented as a [deck.gl](https://deck.gl) layer. It provides the ability to view and edit multiple types of geometry formatted as [GeoJSON](https://tools.ietf.org/html/rfc7946) (an open standard format for geometry) including polygons, lines, and points.
|
|
39
|
-
|
|
40
|
-
```jsx
|
|
41
|
-
import DeckGL from '@deck.gl/react';
|
|
42
|
-
import { EditableGeoJsonLayer, DrawPolygonMode } from '@deck.gl-community/editable-layers';
|
|
43
|
-
|
|
44
|
-
const myFeatureCollection = {
|
|
45
|
-
type: 'FeatureCollection',
|
|
46
|
-
features: [
|
|
47
|
-
/* insert features here */
|
|
48
|
-
],
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const selectedFeatureIndexes = [];
|
|
52
|
-
|
|
53
|
-
class App extends React.Component {
|
|
54
|
-
state = {
|
|
55
|
-
data: myFeatureCollection,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
render() {
|
|
59
|
-
const layer = new EditableGeoJsonLayer({
|
|
60
|
-
id: 'geojson-layer',
|
|
61
|
-
data: this.state.data,
|
|
62
|
-
mode: DrawPolygonMode,
|
|
63
|
-
selectedFeatureIndexes,
|
|
64
|
-
|
|
65
|
-
onEdit: ({ updatedData }) => {
|
|
66
|
-
this.setState({
|
|
67
|
-
data: updatedData,
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
return <DeckGL {...this.props.viewport} layers={[layer]} />;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Useful examples (Codesandbox)
|
|
78
|
-
|
|
79
|
-
- [Hello World (using deck.gl)](https://codesandbox.io/s/hello-world-nebulagl-csvsm)
|
|
80
|
-
- [With Toolbox](https://codesandbox.io/s/hello-nebulagl-with-toolbox-oelkr)
|
|
81
|
-
- [No React](https://codesandbox.io/s/deckgl-and-nebulagl-editablegeojsonlayer-no-react-p9yrs)
|
|
82
|
-
- [Custom EditMode](https://codesandbox.io/s/connect-the-dots-mode-yow65)
|
|
3
|
+
This module contains community maintained editable layers pack for deck.gl.
|
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"}
|
package/dist/constants.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
/**
|
|
2
5
|
* A multiplier for screen-space width/scale for Arc, Line, Icon and Text layers.
|
|
3
6
|
* Required in order to maintain the same appearance after upgrading to deck.gl v8.5.
|
|
@@ -10,5 +13,5 @@ export const PROJECTED_PIXEL_SIZE_MULTIPLIER = 2 / 3;
|
|
|
10
13
|
export const UNIT = {
|
|
11
14
|
common: 0,
|
|
12
15
|
meters: 1,
|
|
13
|
-
pixels: 2
|
|
16
|
+
pixels: 2
|
|
14
17
|
};
|
|
@@ -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,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
2
5
|
export class CompositeMode extends GeoJsonEditMode {
|
|
3
6
|
_modes;
|
|
4
7
|
constructor(modes) {
|
|
@@ -41,7 +44,7 @@ export class CompositeMode extends GeoJsonEditMode {
|
|
|
41
44
|
}
|
|
42
45
|
return {
|
|
43
46
|
type: 'FeatureCollection',
|
|
44
|
-
features: allGuides
|
|
47
|
+
features: allGuides
|
|
45
48
|
};
|
|
46
49
|
}
|
|
47
50
|
}
|
|
@@ -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"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import destination from '@turf/destination';
|
|
2
5
|
import bearing from '@turf/bearing';
|
|
3
6
|
import lineIntersect from '@turf/line-intersect';
|
|
4
7
|
import turfDistance from '@turf/distance';
|
|
5
8
|
import { point, lineString as turfLineString } from '@turf/helpers';
|
|
6
|
-
import { generatePointsParallelToLinePoints, getPickedEditHandle, getEditHandlesForGeometry
|
|
7
|
-
import { GeoJsonEditMode } from
|
|
9
|
+
import { generatePointsParallelToLinePoints, getPickedEditHandle, getEditHandlesForGeometry } from "./utils.js";
|
|
10
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
8
11
|
export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
9
12
|
createTentativeFeature(props) {
|
|
10
13
|
const clickSequence = this.getClickSequence();
|
|
11
14
|
const { mapCoords } = props.lastPointerMoveEvent;
|
|
12
15
|
let p3;
|
|
13
|
-
if (clickSequence.length
|
|
16
|
+
if (clickSequence.length <= 1) {
|
|
14
17
|
p3 = mapCoords;
|
|
15
18
|
}
|
|
16
19
|
else {
|
|
@@ -24,12 +27,12 @@ export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
24
27
|
tentativeFeature = {
|
|
25
28
|
type: 'Feature',
|
|
26
29
|
properties: {
|
|
27
|
-
guideType: 'tentative'
|
|
30
|
+
guideType: 'tentative'
|
|
28
31
|
},
|
|
29
32
|
geometry: {
|
|
30
33
|
type: 'LineString',
|
|
31
|
-
coordinates: [...clickSequence, p3]
|
|
32
|
-
}
|
|
34
|
+
coordinates: [...clickSequence, p3]
|
|
35
|
+
}
|
|
33
36
|
};
|
|
34
37
|
}
|
|
35
38
|
else {
|
|
@@ -37,12 +40,12 @@ export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
37
40
|
tentativeFeature = {
|
|
38
41
|
type: 'Feature',
|
|
39
42
|
properties: {
|
|
40
|
-
guideType: 'tentative'
|
|
43
|
+
guideType: 'tentative'
|
|
41
44
|
},
|
|
42
45
|
geometry: {
|
|
43
46
|
type: 'Polygon',
|
|
44
|
-
coordinates: [[...clickSequence, p3, clickSequence[0]]]
|
|
45
|
-
}
|
|
47
|
+
coordinates: [[...clickSequence, p3, clickSequence[0]]]
|
|
48
|
+
}
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
51
|
return tentativeFeature;
|
|
@@ -50,7 +53,7 @@ export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
50
53
|
getGuides(props) {
|
|
51
54
|
const guides = {
|
|
52
55
|
type: 'FeatureCollection',
|
|
53
|
-
features: []
|
|
56
|
+
features: []
|
|
54
57
|
};
|
|
55
58
|
const clickSequence = this.getClickSequence();
|
|
56
59
|
if (clickSequence.length === 0 || !props.lastPointerMoveEvent) {
|
|
@@ -95,7 +98,7 @@ export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
95
98
|
// They clicked the first or last point (or double-clicked), so complete the polygon
|
|
96
99
|
const polygonToAdd = {
|
|
97
100
|
type: 'Polygon',
|
|
98
|
-
coordinates: this.finalizedCoordinates([...polygon.coordinates[0]])
|
|
101
|
+
coordinates: this.finalizedCoordinates([...polygon.coordinates[0]])
|
|
99
102
|
};
|
|
100
103
|
this.resetClickSequence();
|
|
101
104
|
const editAction = this.getAddFeatureOrBooleanPolygonAction(polygonToAdd, props);
|
|
@@ -104,18 +107,20 @@ export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
else {
|
|
111
|
+
// Trigger pointer move right away in order for it to update edit handles (to support double-click)
|
|
112
|
+
const fakePointerMoveEvent = {
|
|
113
|
+
screenCoords: [-1, -1],
|
|
114
|
+
mapCoords: event.mapCoords,
|
|
115
|
+
picks: [],
|
|
116
|
+
pointerDownPicks: null,
|
|
117
|
+
pointerDownScreenCoords: null,
|
|
118
|
+
pointerDownMapCoords: null,
|
|
119
|
+
cancelPan: () => { },
|
|
120
|
+
sourceEvent: null
|
|
121
|
+
};
|
|
122
|
+
this.handlePointerMove(fakePointerMoveEvent, props);
|
|
123
|
+
}
|
|
119
124
|
}
|
|
120
125
|
finalizedCoordinates(coords) {
|
|
121
126
|
// Remove the hovered position
|
|
@@ -159,12 +164,12 @@ export class Draw90DegreePolygonMode extends GeoJsonEditMode {
|
|
|
159
164
|
[0, 1, 2].forEach((indexFirst) => {
|
|
160
165
|
const line1 = turfLineString([
|
|
161
166
|
p1,
|
|
162
|
-
destination(p1, distance, angles.first[indexFirst]).geometry.coordinates
|
|
167
|
+
destination(p1, distance, angles.first[indexFirst]).geometry.coordinates
|
|
163
168
|
]);
|
|
164
169
|
[0, 1, 2].forEach((indexSecond) => {
|
|
165
170
|
const line2 = turfLineString([
|
|
166
171
|
p3,
|
|
167
|
-
destination(p3, distance, angles.second[indexSecond]).geometry.coordinates
|
|
172
|
+
destination(p3, distance, angles.second[indexSecond]).geometry.coordinates
|
|
168
173
|
]);
|
|
169
174
|
const fc = lineIntersect(line1, line2);
|
|
170
175
|
if (fc && fc.features.length) {
|
|
@@ -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;IA4B3F;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE;IAS3D;;;;;;OAMG;IACH,YAAY,qBAuBT;CACJ"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import circle from '@turf/circle';
|
|
2
5
|
import distance from '@turf/distance';
|
|
3
6
|
import area from '@turf/area';
|
|
4
|
-
import memoize from
|
|
5
|
-
import { getIntermediatePosition } from
|
|
6
|
-
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";
|
|
7
10
|
export class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
8
11
|
radius = null;
|
|
9
12
|
position = null;
|
|
@@ -42,7 +45,7 @@ export class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
|
42
45
|
modeConfig: props.modeConfig,
|
|
43
46
|
radius: this.radius,
|
|
44
47
|
areaCircle: this.areaCircle,
|
|
45
|
-
diameter: this.diameter
|
|
48
|
+
diameter: this.diameter
|
|
46
49
|
});
|
|
47
50
|
}
|
|
48
51
|
/**
|
|
@@ -69,8 +72,8 @@ export class DrawCircleByDiameterMode extends TwoClickPolygonMode {
|
|
|
69
72
|
tooltips = [
|
|
70
73
|
{
|
|
71
74
|
position: this.position,
|
|
72
|
-
text
|
|
73
|
-
}
|
|
75
|
+
text
|
|
76
|
+
}
|
|
74
77
|
];
|
|
75
78
|
}
|
|
76
79
|
return tooltips;
|
|
@@ -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;IAwB3F;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE;IAQ3D;;;;;OAKG;IACH,YAAY,qBAsBT;CACJ"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import circle from '@turf/circle';
|
|
2
5
|
import distance from '@turf/distance';
|
|
3
6
|
import area from '@turf/area';
|
|
4
|
-
import memoize from
|
|
5
|
-
import { TwoClickPolygonMode } from
|
|
7
|
+
import { memoize } from "../utils/memoize.js";
|
|
8
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
6
9
|
export class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
7
10
|
radius = null;
|
|
8
11
|
position = null;
|
|
@@ -36,7 +39,7 @@ export class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
|
36
39
|
return this._getTooltips({
|
|
37
40
|
modeConfig: props?.modeConfig,
|
|
38
41
|
radius: this.radius,
|
|
39
|
-
areaCircle: this.areaCircle
|
|
42
|
+
areaCircle: this.areaCircle
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
@@ -61,8 +64,8 @@ export class DrawCircleFromCenterMode extends TwoClickPolygonMode {
|
|
|
61
64
|
tooltips = [
|
|
62
65
|
{
|
|
63
66
|
position: this.position,
|
|
64
|
-
text
|
|
65
|
-
}
|
|
67
|
+
text
|
|
68
|
+
}
|
|
66
69
|
];
|
|
67
70
|
}
|
|
68
71
|
return tooltips;
|
|
@@ -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;CAe5F"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import bboxPolygon from '@turf/bbox-polygon';
|
|
2
5
|
import distance from '@turf/distance';
|
|
3
6
|
import ellipse from '@turf/ellipse';
|
|
4
7
|
import { point } from '@turf/helpers';
|
|
5
|
-
import { getIntermediatePosition } from
|
|
6
|
-
import { TwoClickPolygonMode } from
|
|
8
|
+
import { getIntermediatePosition } from "./geojson-edit-mode.js";
|
|
9
|
+
import { TwoClickPolygonMode } from "./two-click-polygon-mode.js";
|
|
7
10
|
export class DrawEllipseByBoundingBoxMode extends TwoClickPolygonMode {
|
|
8
11
|
getTwoClickPolygon(coord1, coord2, modeConfig) {
|
|
9
12
|
const minX = Math.min(coord1[0], coord2[0]);
|
|
@@ -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;CAQzC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import distance from '@turf/distance';
|
|
2
5
|
import ellipse from '@turf/ellipse';
|
|
3
6
|
import bearing from '@turf/bearing';
|
|
4
7
|
import { point } from '@turf/helpers';
|
|
5
|
-
import { getIntermediatePosition } from
|
|
6
|
-
import { ThreeClickPolygonMode } from
|
|
8
|
+
import { getIntermediatePosition } from "./geojson-edit-mode.js";
|
|
9
|
+
import { ThreeClickPolygonMode } from "./three-click-polygon-mode.js";
|
|
7
10
|
export class DrawEllipseUsingThreePointsMode extends ThreeClickPolygonMode {
|
|
8
11
|
getThreeClickPolygon(coord1, coord2, coord3, modeConfig) {
|
|
9
12
|
const centerCoordinates = getIntermediatePosition(coord1, coord2);
|
|
@@ -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"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import distance from '@turf/distance';
|
|
2
|
-
import memoize from
|
|
3
|
-
import { getPickedEditHandle } from
|
|
4
|
-
import { GeoJsonEditMode } from
|
|
5
|
+
import { memoize } from "../utils/memoize.js";
|
|
6
|
+
import { getPickedEditHandle } from "./utils.js";
|
|
7
|
+
import { GeoJsonEditMode } from "./geojson-edit-mode.js";
|
|
5
8
|
export class DrawLineStringMode extends GeoJsonEditMode {
|
|
6
9
|
// declaration of variables for the calculation of the distance of linestring
|
|
7
10
|
dist = 0;
|
|
@@ -30,7 +33,7 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
30
33
|
this.dist = 0;
|
|
31
34
|
const lineStringToAdd = {
|
|
32
35
|
type: 'LineString',
|
|
33
|
-
coordinates: [...clickSequence]
|
|
36
|
+
coordinates: [...clickSequence]
|
|
34
37
|
};
|
|
35
38
|
this.resetClickSequence();
|
|
36
39
|
const editAction = this.getAddFeatureAction(lineStringToAdd, props.data);
|
|
@@ -45,8 +48,8 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
45
48
|
updatedData: props.data,
|
|
46
49
|
editType: 'addTentativePosition',
|
|
47
50
|
editContext: {
|
|
48
|
-
position: event.mapCoords
|
|
49
|
-
}
|
|
51
|
+
position: event.mapCoords
|
|
52
|
+
}
|
|
50
53
|
});
|
|
51
54
|
}
|
|
52
55
|
}
|
|
@@ -57,7 +60,7 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
57
60
|
if (clickSequence.length > 1) {
|
|
58
61
|
const lineStringToAdd = {
|
|
59
62
|
type: 'LineString',
|
|
60
|
-
coordinates: [...clickSequence]
|
|
63
|
+
coordinates: [...clickSequence]
|
|
61
64
|
};
|
|
62
65
|
this.resetClickSequence();
|
|
63
66
|
const editAction = this.getAddFeatureAction(lineStringToAdd, props.data);
|
|
@@ -72,7 +75,7 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
72
75
|
// Because the new drawing feature is dropped, so the data will keep as the same.
|
|
73
76
|
updatedData: props.data,
|
|
74
77
|
editType: 'cancelFeature',
|
|
75
|
-
editContext: {}
|
|
78
|
+
editContext: {}
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -82,19 +85,19 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
82
85
|
const lastCoords = lastPointerMoveEvent ? [lastPointerMoveEvent.mapCoords] : [];
|
|
83
86
|
const guides = {
|
|
84
87
|
type: 'FeatureCollection',
|
|
85
|
-
features: []
|
|
88
|
+
features: []
|
|
86
89
|
};
|
|
87
90
|
let tentativeFeature;
|
|
88
91
|
if (clickSequence.length > 0) {
|
|
89
92
|
tentativeFeature = {
|
|
90
93
|
type: 'Feature',
|
|
91
94
|
properties: {
|
|
92
|
-
guideType: 'tentative'
|
|
95
|
+
guideType: 'tentative'
|
|
93
96
|
},
|
|
94
97
|
geometry: {
|
|
95
98
|
type: 'LineString',
|
|
96
|
-
coordinates: [...clickSequence, ...lastCoords]
|
|
97
|
-
}
|
|
99
|
+
coordinates: [...clickSequence, ...lastCoords]
|
|
100
|
+
}
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
if (tentativeFeature) {
|
|
@@ -106,12 +109,12 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
106
109
|
guideType: 'editHandle',
|
|
107
110
|
editHandleType: 'existing',
|
|
108
111
|
featureIndex: -1,
|
|
109
|
-
positionIndexes: [index]
|
|
112
|
+
positionIndexes: [index]
|
|
110
113
|
},
|
|
111
114
|
geometry: {
|
|
112
115
|
type: 'Point',
|
|
113
|
-
coordinates: clickedCoord
|
|
114
|
-
}
|
|
116
|
+
coordinates: clickedCoord
|
|
117
|
+
}
|
|
115
118
|
}));
|
|
116
119
|
guides.features.push(...editHandles);
|
|
117
120
|
return guides;
|
|
@@ -127,7 +130,7 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
127
130
|
getTooltips(props) {
|
|
128
131
|
return this._getTooltips({
|
|
129
132
|
modeConfig: props.modeConfig,
|
|
130
|
-
dist: this.dist
|
|
133
|
+
dist: this.dist
|
|
131
134
|
});
|
|
132
135
|
}
|
|
133
136
|
// utility function
|
|
@@ -161,8 +164,8 @@ export class DrawLineStringMode extends GeoJsonEditMode {
|
|
|
161
164
|
tooltips = [
|
|
162
165
|
{
|
|
163
166
|
position: this.position,
|
|
164
|
-
text
|
|
165
|
-
}
|
|
167
|
+
text
|
|
168
|
+
}
|
|
166
169
|
];
|
|
167
170
|
}
|
|
168
171
|
return tooltips;
|
|
@@ -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"}
|