@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
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import booleanPointInPolygon from '@turf/boolean-point-in-polygon';
|
|
2
5
|
import turfDifference from '@turf/difference';
|
|
3
6
|
import turfBuffer from '@turf/buffer';
|
|
@@ -8,8 +11,8 @@ import turfDistance from '@turf/distance';
|
|
|
8
11
|
import turfDestination from '@turf/destination';
|
|
9
12
|
import turfPolygonToLine from '@turf/polygon-to-line';
|
|
10
13
|
import nearestPointOnLine from '@turf/nearest-point-on-line';
|
|
11
|
-
import { generatePointsParallelToLinePoints } from
|
|
12
|
-
import { ModeHandler } from
|
|
14
|
+
import { generatePointsParallelToLinePoints } from "../utils/utils.js";
|
|
15
|
+
import { ModeHandler } from "./mode-handler.js";
|
|
13
16
|
// TODO edit-modes: delete handlers once EditMode fully implemented
|
|
14
17
|
export class SplitPolygonHandler extends ModeHandler {
|
|
15
18
|
calculateMapCoords(clickSequence, mapCoords) {
|
|
@@ -40,7 +43,7 @@ export class SplitPolygonHandler extends ModeHandler {
|
|
|
40
43
|
const lastBearing = turfBearing(firstPoint, closestPoint);
|
|
41
44
|
const currentDistance = turfDistance(firstPoint, mapCoords, { units: 'meters' });
|
|
42
45
|
return turfDestination(firstPoint, currentDistance, lastBearing, {
|
|
43
|
-
units: 'meters'
|
|
46
|
+
units: 'meters'
|
|
44
47
|
}).geometry.coordinates;
|
|
45
48
|
}
|
|
46
49
|
return mapCoords;
|
|
@@ -56,7 +59,7 @@ export class SplitPolygonHandler extends ModeHandler {
|
|
|
56
59
|
handleClick(event) {
|
|
57
60
|
super.handleClick({
|
|
58
61
|
...event,
|
|
59
|
-
mapCoords: this.calculateMapCoords(this.getClickSequence(), event.mapCoords)
|
|
62
|
+
mapCoords: this.calculateMapCoords(this.getClickSequence(), event.mapCoords)
|
|
60
63
|
});
|
|
61
64
|
const editAction = null;
|
|
62
65
|
const tentativeFeature = this.getTentativeFeature();
|
|
@@ -70,7 +73,7 @@ export class SplitPolygonHandler extends ModeHandler {
|
|
|
70
73
|
}
|
|
71
74
|
const pt = {
|
|
72
75
|
type: 'Point',
|
|
73
|
-
coordinates: clickSequence[clickSequence.length - 1]
|
|
76
|
+
coordinates: clickSequence[clickSequence.length - 1]
|
|
74
77
|
};
|
|
75
78
|
// @ts-expect-error turf type diff
|
|
76
79
|
const isPointInPolygon = booleanPointInPolygon(pt, selectedGeometry);
|
|
@@ -97,8 +100,8 @@ export class SplitPolygonHandler extends ModeHandler {
|
|
|
97
100
|
type: 'Feature',
|
|
98
101
|
geometry: {
|
|
99
102
|
type: 'LineString',
|
|
100
|
-
coordinates: [...clickSequence, this.calculateMapCoords(clickSequence, mapCoords)]
|
|
101
|
-
}
|
|
103
|
+
coordinates: [...clickSequence, this.calculateMapCoords(clickSequence, mapCoords)]
|
|
104
|
+
}
|
|
102
105
|
});
|
|
103
106
|
return result;
|
|
104
107
|
}
|
|
@@ -141,13 +144,13 @@ export class SplitPolygonHandler extends ModeHandler {
|
|
|
141
144
|
// Update the type to Mulitpolygon
|
|
142
145
|
const updatedData = this.getImmutableFeatureCollection().replaceGeometry(featureIndex, {
|
|
143
146
|
type: 'MultiPolygon',
|
|
144
|
-
coordinates: updatedCoordinates
|
|
147
|
+
coordinates: updatedCoordinates
|
|
145
148
|
});
|
|
146
149
|
const editAction = {
|
|
147
150
|
updatedData: updatedData.getObject(),
|
|
148
151
|
editType: 'split',
|
|
149
152
|
featureIndexes: [featureIndex],
|
|
150
|
-
editContext: null
|
|
153
|
+
editContext: null
|
|
151
154
|
};
|
|
152
155
|
return editAction;
|
|
153
156
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ClickEvent } from
|
|
2
|
-
import { ModeHandler, EditAction } from
|
|
1
|
+
import { ClickEvent } from "../edit-modes/types.js";
|
|
2
|
+
import { ModeHandler, EditAction } from "./mode-handler.js";
|
|
3
3
|
export declare class ThreeClickPolygonHandler extends ModeHandler {
|
|
4
4
|
handleClick(event: ClickEvent): EditAction | null | undefined;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=three-click-polygon-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three-click-polygon-handler.d.ts","sourceRoot":"","sources":["../../src/mode-handlers/three-click-polygon-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAC,+BAA4B;AAC/C,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,0BAAuB;AAGvD,qBAAa,wBAAyB,SAAQ,WAAW;IACvD,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS;CAmB9D"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { ModeHandler } from "./mode-handler.js";
|
|
2
5
|
// TODO edit-modes: delete handlers once EditMode fully implemented
|
|
3
6
|
export class ThreeClickPolygonHandler extends ModeHandler {
|
|
4
7
|
handleClick(event) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FeatureCollection, Position } from
|
|
2
|
-
import { PointerMoveEvent, StartDraggingEvent, StopDraggingEvent } from
|
|
3
|
-
import { EditAction, ModeHandler } from
|
|
1
|
+
import { FeatureCollection, Position } from "../utils/geojson-types.js";
|
|
2
|
+
import { PointerMoveEvent, StartDraggingEvent, StopDraggingEvent } from "../edit-modes/types.js";
|
|
3
|
+
import { EditAction, ModeHandler } from "./mode-handler.js";
|
|
4
4
|
export declare class TranslateHandler extends ModeHandler {
|
|
5
5
|
_geometryBeforeTranslate: FeatureCollection | null | undefined;
|
|
6
6
|
_isTranslatable: boolean;
|
|
@@ -15,3 +15,4 @@ export declare class TranslateHandler extends ModeHandler {
|
|
|
15
15
|
}): string;
|
|
16
16
|
getTranslateAction(startDragPoint: Position, currentPoint: Position, editType: string): EditAction | null | undefined;
|
|
17
17
|
}
|
|
18
|
+
//# sourceMappingURL=translate-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate-handler.d.ts","sourceRoot":"","sources":["../../src/mode-handlers/translate-handler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,iBAAiB,EAAE,QAAQ,EAAC,kCAA+B;AACnE,OAAO,EAAC,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,+BAA4B;AAC5F,OAAO,EAAC,UAAU,EAAE,WAAW,EAAC,0BAAuB;AAGvD,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,wBAAwB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/D,eAAe,EAAE,OAAO,CAAc;IAEtC,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG;QAC1C,UAAU,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;QAC1C,YAAY,EAAE,OAAO,CAAC;KACvB;IAuBD,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS;IAS7E,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS;IAgB3E,SAAS,CAAC,EAAC,UAAU,EAAC,EAAE;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,GAAG,MAAM;IAOtD,kBAAkB,CAChB,cAAc,EAAE,QAAQ,EACxB,YAAY,EAAE,QAAQ,EACtB,QAAQ,EAAE,MAAM,GACf,UAAU,GAAG,IAAI,GAAG,SAAS;CAkCjC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import turfBearing from '@turf/bearing';
|
|
2
5
|
import turfDistance from '@turf/distance';
|
|
3
6
|
import turfTransformTranslate from '@turf/transform-translate';
|
|
4
7
|
import { point } from '@turf/helpers';
|
|
5
|
-
import { ModeHandler } from
|
|
8
|
+
import { ModeHandler } from "./mode-handler.js";
|
|
6
9
|
// TODO edit-modes: delete handlers once EditMode fully implemented
|
|
7
10
|
export class TranslateHandler extends ModeHandler {
|
|
8
11
|
_geometryBeforeTranslate;
|
|
@@ -66,7 +69,7 @@ export class TranslateHandler extends ModeHandler {
|
|
|
66
69
|
updatedData: updatedData.getObject(),
|
|
67
70
|
editType,
|
|
68
71
|
featureIndexes: selectedIndexes,
|
|
69
|
-
editContext: null
|
|
72
|
+
editContext: null
|
|
70
73
|
};
|
|
71
74
|
}
|
|
72
75
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ClickEvent } from
|
|
2
|
-
import { ModeHandler, EditAction } from
|
|
1
|
+
import { ClickEvent } from "../edit-modes/types.js";
|
|
2
|
+
import { ModeHandler, EditAction } from "./mode-handler.js";
|
|
3
3
|
export declare class TwoClickPolygonHandler extends ModeHandler {
|
|
4
4
|
handleClick(event: ClickEvent): EditAction | null | undefined;
|
|
5
5
|
}
|
|
6
|
+
//# sourceMappingURL=two-click-polygon-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"two-click-polygon-handler.d.ts","sourceRoot":"","sources":["../../src/mode-handlers/two-click-polygon-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,UAAU,EAAC,+BAA4B;AAC/C,OAAO,EAAC,WAAW,EAAE,UAAU,EAAC,0BAAuB;AAGvD,qBAAa,sBAAuB,SAAQ,WAAW;IACrD,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS;CAmB9D"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { ModeHandler } from "./mode-handler.js";
|
|
2
5
|
// TODO edit-modes: delete handlers once EditMode fully implemented
|
|
3
6
|
export class TwoClickPolygonHandler extends ModeHandler {
|
|
4
7
|
handleClick(event) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Position } from
|
|
2
|
-
import { EditHandle, ModeHandler } from
|
|
1
|
+
import { Position } from "../utils/geojson-types.js";
|
|
2
|
+
import { EditHandle, ModeHandler } from "./mode-handler.js";
|
|
3
3
|
export declare class ViewHandler extends ModeHandler {
|
|
4
4
|
getCursor({ isDragging }: {
|
|
5
5
|
isDragging: boolean;
|
|
6
6
|
}): string;
|
|
7
7
|
getEditHandles(picks?: Array<Record<string, any>>, mapCoords?: Position): EditHandle[];
|
|
8
8
|
}
|
|
9
|
+
//# sourceMappingURL=view-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-handler.d.ts","sourceRoot":"","sources":["../../src/mode-handlers/view-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,QAAQ,EAAC,kCAA+B;AAChD,OAAO,EAAC,UAAU,EAAE,WAAW,EAAC,0BAAuB;AAGvD,qBAAa,WAAY,SAAQ,WAAW;IAC1C,SAAS,CAAC,EAAC,UAAU,EAAC,EAAE;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,GAAG,MAAM;IAItD,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,EAAE;CAGvF"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { ModeHandler } from "./mode-handler.js";
|
|
2
5
|
// TODO edit-modes: delete handlers once EditMode fully implemented
|
|
3
6
|
export class ViewHandler extends ModeHandler {
|
|
4
7
|
getCursor({ isDragging }) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
declare function getUniforms(opts?: Record<string, number>): Record<string, number>;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
/** Shader module that implements desaturation. @note still WIP */
|
|
3
|
+
export declare const color: {
|
|
4
|
+
readonly name: "color";
|
|
5
|
+
readonly vs: "in vec4 color_vColor;\n\ncolor_setColor(vec4 color) {\n color_vColor = color;\n}\n";
|
|
6
|
+
readonly fs: "uniform float color_uOpacity;\nuniform float color_uDesaturate;\nuniform float color_uBrightness;\n\nin vec4 color_vColor;\n\nout vec4 fragColor;\n\nvec4 color_getColor() {\n return color_vColor;\n}\n\nvec4 color_filterColor(vec4 color) {\n // apply desaturation and brightness\n if (color_uDesaturate > 0.01) {\n float luminance = (color.r + color.g + color.b) * 0.333333333 + color_uBrightness;\n color = vec4(mix(color.rgb, vec3(luminance), color_uDesaturate), color.a);\n\n // Apply opacity\n color = vec4(color.rgb, color.a * color_uOpacity);\n return color;\n}\n";
|
|
7
|
+
readonly getUniforms: typeof getUniforms;
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/shaderlib/color/color.ts"],"names":[],"mappings":"AAaA,iBAAS,WAAW,CAAC,IAAI,yBAAgB,0BAMxC;AAmCD,kEAAkE;AAClE,eAAO,MAAM,KAAK;;;;;CAKe,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
//
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
2
4
|
/* eslint-disable camelcase */
|
|
3
5
|
const INITIAL_STATE = {
|
|
4
6
|
color_uOpacity: 1.0,
|
|
5
7
|
color_uDesaturate: 0.0,
|
|
6
|
-
color_uBrightness: 1.0
|
|
8
|
+
color_uBrightness: 1.0
|
|
7
9
|
};
|
|
8
10
|
function getUniforms(opts = INITIAL_STATE) {
|
|
9
11
|
const uniforms = {};
|
|
@@ -43,9 +45,10 @@ vec4 color_filterColor(vec4 color) {
|
|
|
43
45
|
return color;
|
|
44
46
|
}
|
|
45
47
|
`;
|
|
46
|
-
|
|
48
|
+
/** Shader module that implements desaturation. @note still WIP */
|
|
49
|
+
export const color = {
|
|
47
50
|
name: 'color',
|
|
48
51
|
vs,
|
|
49
52
|
fs,
|
|
50
|
-
getUniforms
|
|
53
|
+
getUniforms
|
|
51
54
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare function getUniforms({}?: {}): void;
|
|
2
|
-
declare const
|
|
2
|
+
export declare const utils: {
|
|
3
3
|
name: string;
|
|
4
4
|
vs: string;
|
|
5
5
|
fs: string;
|
|
6
6
|
getUniforms: typeof getUniforms;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/shaderlib/utils/utils.ts"],"names":[],"mappings":"AASA,iBAAS,WAAW,CAAC,EAAE,KAAgB,QAAI;AAsB3C,eAAO,MAAM,KAAK;;;;;CAKjB,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
// TODO - this module is a WIP
|
|
2
5
|
/* eslint-disable camelcase */
|
|
3
6
|
const INITIAL_STATE = {};
|
|
@@ -20,9 +23,9 @@ vec2 project_clipspace_to_projective_uv(vec4 position) {
|
|
|
20
23
|
}
|
|
21
24
|
`;
|
|
22
25
|
const fs = vs;
|
|
23
|
-
export
|
|
26
|
+
export const utils = {
|
|
24
27
|
name: 'outline',
|
|
25
28
|
vs,
|
|
26
29
|
fs,
|
|
27
|
-
getUniforms
|
|
30
|
+
getUniforms
|
|
28
31
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curve-utils.d.ts","sourceRoot":"","sources":["../../src/utils/curve-utils.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAW,MAAM,eAAe,CAAC;AAYlF,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,GAC7B,OAAO,CAAC,UAAU,CAAC,CA2DrB"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import hermite from 'cubic-hermite-spline';
|
|
2
5
|
import turfDistance from '@turf/distance';
|
|
3
6
|
import { lineString } from '@turf/helpers';
|
|
@@ -27,13 +30,13 @@ export function generateCurveFromControlPoints(line) {
|
|
|
27
30
|
// calculate tangents
|
|
28
31
|
const tangents = [];
|
|
29
32
|
// first tangent
|
|
30
|
-
// @ts-
|
|
33
|
+
// @ts-expect-error TODO
|
|
31
34
|
tangents.push(calculateSingleTangent(coords[0], coords[1], knots[1] - knots[0]));
|
|
32
35
|
// second to before last
|
|
33
36
|
for (let i = 1; i < coords.length - 1; i++) {
|
|
34
|
-
// @ts-
|
|
37
|
+
// @ts-expect-error TODO
|
|
35
38
|
const A = calculateSingleTangent(coords[i], coords[i + 1], knots[i + 1] - knots[i]);
|
|
36
|
-
// @ts-
|
|
39
|
+
// @ts-expect-error TODO
|
|
37
40
|
const B = calculateSingleTangent(coords[i - 1], coords[i], knots[i] - knots[i - 1]);
|
|
38
41
|
const x = (A[0] + B[0]) / 2.0;
|
|
39
42
|
const y = (A[1] + B[1]) / 2.0;
|
|
@@ -42,7 +45,7 @@ export function generateCurveFromControlPoints(line) {
|
|
|
42
45
|
// last tangent
|
|
43
46
|
const last = coords.length - 1;
|
|
44
47
|
tangents.push(
|
|
45
|
-
// @ts-
|
|
48
|
+
// @ts-expect-error TODO
|
|
46
49
|
calculateSingleTangent(coords[last - 1], coords[last], knots[last] - knots[last - 1]));
|
|
47
50
|
// generate curve
|
|
48
51
|
const result = [];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, Position } from 'geojson';
|
|
2
|
+
export { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, Position };
|
|
2
3
|
export type PointCoordinates = Position;
|
|
3
4
|
export type LineStringCoordinates = Position[];
|
|
4
5
|
export type PolygonCoordinates = Position[][];
|
|
@@ -6,30 +7,6 @@ export type MultiPointCoordinates = Position[];
|
|
|
6
7
|
export type MultiLineStringCoordinates = Position[][];
|
|
7
8
|
export type MultiPolygonCoordinates = Position[][][];
|
|
8
9
|
export type AnyCoordinates = PointCoordinates | LineStringCoordinates | PolygonCoordinates | MultiPointCoordinates | MultiLineStringCoordinates | MultiPolygonCoordinates;
|
|
9
|
-
export type Point = {
|
|
10
|
-
type: 'Point';
|
|
11
|
-
coordinates: PointCoordinates;
|
|
12
|
-
};
|
|
13
|
-
export type LineString = {
|
|
14
|
-
type: 'LineString';
|
|
15
|
-
coordinates: LineStringCoordinates;
|
|
16
|
-
};
|
|
17
|
-
export type Polygon = {
|
|
18
|
-
type: 'Polygon';
|
|
19
|
-
coordinates: PolygonCoordinates;
|
|
20
|
-
};
|
|
21
|
-
export type MultiPoint = {
|
|
22
|
-
type: 'MultiPoint';
|
|
23
|
-
coordinates: MultiPointCoordinates;
|
|
24
|
-
};
|
|
25
|
-
export type MultiLineString = {
|
|
26
|
-
type: 'MultiLineString';
|
|
27
|
-
coordinates: MultiLineStringCoordinates;
|
|
28
|
-
};
|
|
29
|
-
export type MultiPolygon = {
|
|
30
|
-
type: 'MultiPolygon';
|
|
31
|
-
coordinates: MultiPolygonCoordinates;
|
|
32
|
-
};
|
|
33
10
|
export type Geometry = Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon;
|
|
34
11
|
export type Polygonal = Polygon | MultiPolygon;
|
|
35
12
|
export type BoundingBoxArray = [number, number, number, number];
|
|
@@ -56,3 +33,4 @@ export type FeatureCollection = {
|
|
|
56
33
|
bbox?: BoundingBoxArray;
|
|
57
34
|
};
|
|
58
35
|
export type AnyGeoJson = Feature | FeatureCollection;
|
|
36
|
+
//# sourceMappingURL=geojson-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geojson-types.d.ts","sourceRoot":"","sources":["../../src/utils/geojson-types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,KAAK,EACL,UAAU,EACV,OAAO,EACP,UAAU,EACV,eAAe,EACf,YAAY,EACZ,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAC,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AACxC,MAAM,MAAM,qBAAqB,GAAG,QAAQ,EAAE,CAAC;AAC/C,MAAM,MAAM,kBAAkB,GAAG,QAAQ,EAAE,EAAE,CAAC;AAC9C,MAAM,MAAM,qBAAqB,GAAG,QAAQ,EAAE,CAAC;AAC/C,MAAM,MAAM,0BAA0B,GAAG,QAAQ,EAAE,EAAE,CAAC;AACtD,MAAM,MAAM,uBAAuB,GAAG,QAAQ,EAAE,EAAE,EAAE,CAAC;AAErD,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,qBAAqB,GACrB,kBAAkB,GAClB,qBAAqB,GACrB,0BAA0B,GAC1B,uBAAuB,CAAC;AAE5B,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,eAAe,GAAG,YAAY,CAAC;AAElG,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;AAI/C,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,QAAQ,IAAI;IAC1C,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,CAAC,CAAC;IACZ,UAAU,CAAC,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,IAAI;IACpD,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,CAAC,CAAC;IACZ,UAAU,EAAE,CAAC,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,OAAO,GACf,SAAS,CAAC,KAAK,CAAC,GAChB,SAAS,CAAC,UAAU,CAAC,GACrB,SAAS,CAAC,OAAO,CAAC,GAClB,SAAS,CAAC,UAAU,CAAC,GACrB,SAAS,CAAC,eAAe,CAAC,GAC1B,SAAS,CAAC,YAAY,CAAC,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,iBAAiB,CAAC"}
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
* https://en.wikipedia.org/wiki/Memoization
|
|
4
4
|
* @param {function} compute - the function to be memoized
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare function memoize(compute: Function): (args: any) => any;
|
|
7
|
+
//# sourceMappingURL=memoize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["../../src/utils/memoize.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,QAAQ,UAIzB,GAAG,SAUlB"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
// port from @deck.gl/core
|
|
2
5
|
function isEqual(a, b) {
|
|
3
6
|
if (a === b) {
|
|
@@ -24,7 +27,7 @@ function isEqual(a, b) {
|
|
|
24
27
|
* https://en.wikipedia.org/wiki/Memoization
|
|
25
28
|
* @param {function} compute - the function to be memoized
|
|
26
29
|
*/
|
|
27
|
-
export
|
|
30
|
+
export function memoize(compute) {
|
|
28
31
|
let cachedArgs = {};
|
|
29
32
|
let cachedResult;
|
|
30
33
|
return (args) => {
|
|
@@ -2,3 +2,4 @@ import type { Feature as TurfFeature, Geometry as TurfGeometry } from '@turf/hel
|
|
|
2
2
|
export declare function translateFromCenter(feature: TurfFeature<TurfGeometry>, distance: number, direction: number): TurfFeature<TurfGeometry, {
|
|
3
3
|
[name: string]: any;
|
|
4
4
|
}>;
|
|
5
|
+
//# sourceMappingURL=translate-from-center.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate-from-center.d.ts","sourceRoot":"","sources":["../../src/utils/translate-from-center.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,OAAO,IAAI,WAAW,EACtB,QAAQ,IAAI,YAAY,EACzB,MAAM,eAAe,CAAC;AAMvB,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC,EAClC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM;;GA8BlB"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
1
4
|
import turfCenter from '@turf/center';
|
|
2
5
|
import turfRhumbBearing from '@turf/rhumb-bearing';
|
|
3
6
|
import turfRhumbDistance from '@turf/rhumb-distance';
|
|
4
7
|
import turfRhumbDestination from '@turf/rhumb-destination';
|
|
5
|
-
import { mapCoords } from
|
|
8
|
+
import { mapCoords } from "../edit-modes/utils.js";
|
|
6
9
|
// This function takes feature's center, moves it,
|
|
7
10
|
// and builds new feature around it keeping the proportions
|
|
8
11
|
export function translateFromCenter(feature, distance, direction) {
|
|
9
12
|
const initialCenterPoint = turfCenter(feature);
|
|
10
13
|
const movedCenterPoint = turfRhumbDestination(initialCenterPoint, distance, direction);
|
|
11
14
|
const movedCoordinates = mapCoords(feature.geometry.coordinates, (coordinate) => {
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const movedPosition = turfRhumbDestination(movedCenterPoint.geometry.coordinates,
|
|
15
|
+
const rhumbDistance = turfRhumbDistance(initialCenterPoint.geometry.coordinates, coordinate);
|
|
16
|
+
const rhumbDirection = turfRhumbBearing(initialCenterPoint.geometry.coordinates, coordinate);
|
|
17
|
+
const movedPosition = turfRhumbDestination(movedCenterPoint.geometry.coordinates, rhumbDistance, rhumbDirection).geometry.coordinates;
|
|
15
18
|
return movedPosition;
|
|
16
19
|
});
|
|
17
20
|
feature.geometry.coordinates = movedCoordinates;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACnC,CAAC;AAGF,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,KAAK,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FeatureOf, FeatureWithProps, LineString, Point, Position } from
|
|
2
|
-
import { Viewport } from
|
|
1
|
+
import { FeatureOf, FeatureWithProps, LineString, Point, Position } from "./geojson-types.js";
|
|
2
|
+
import { Viewport } from "./types.js";
|
|
3
3
|
export type NearestPointType = FeatureWithProps<Point, {
|
|
4
4
|
dist: number;
|
|
5
5
|
index: number;
|
|
@@ -13,8 +13,9 @@ export declare function nearestPointOnProjectedLine(line: FeatureOf<LineString>,
|
|
|
13
13
|
/**
|
|
14
14
|
* Inserts toInsert string into base string before insertBefore string.
|
|
15
15
|
* @param base A string to insert into.
|
|
16
|
-
* @param
|
|
16
|
+
* @param insertBeforeText A sub string in `base` string to insert before.
|
|
17
17
|
* @param toInsert A string to insert.
|
|
18
18
|
* @returns Combined string. `base` string if `insertBefore` string isn't found.
|
|
19
19
|
*/
|
|
20
|
-
export declare function insertBefore(base: string,
|
|
20
|
+
export declare function insertBefore(base: string, insertBeforeText: string, toInsert: string): string;
|
|
21
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAC,2BAAwB;AACzF,OAAO,EAAC,QAAQ,EAAC,mBAAgB;AAIjC,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,KAAK,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AAEtF,wBAAgB,WAAW,CACzB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EACjD,YAAY,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAoB,GAChE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAKlC;AA2BD,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EACrB,EAAE,EAAE,QAAQ,WAYb;AAED,wBAAgB,kCAAkC,CAChD,EAAE,EAAE,QAAQ,EACZ,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,QAAQ,GAClB,QAAQ,EAAE,CAuBZ;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,EAC3B,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,EACzB,QAAQ,EAAE,QAAQ,GACjB,gBAAgB,CA6DlB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM7F"}
|
|
@@ -1,3 +1,6 @@
|
|
|
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 pointToLineDistance from '@turf/point-to-line-distance';
|
|
@@ -49,7 +52,7 @@ export function recursivelyTraverseNestedArrays(array, prefix, fn) {
|
|
|
49
52
|
export function generatePointsParallelToLinePoints(p1, p2, mapCoords) {
|
|
50
53
|
const lineString = {
|
|
51
54
|
type: 'LineString',
|
|
52
|
-
coordinates: [p1, p2]
|
|
55
|
+
coordinates: [p1, p2]
|
|
53
56
|
};
|
|
54
57
|
const pt = point(mapCoords);
|
|
55
58
|
const ddistance = pointToLineDistance(pt, lineString);
|
|
@@ -102,7 +105,7 @@ export function nearestPointOnProjectedLine(line, inPoint, viewport) {
|
|
|
102
105
|
minPointInfo = {
|
|
103
106
|
index,
|
|
104
107
|
x0: (B * (B * x - A * y) - A * C) / div,
|
|
105
|
-
y0: (A * (-B * x + A * y) - B * C) / div
|
|
108
|
+
y0: (A * (-B * x + A * y) - B * C) / div
|
|
106
109
|
};
|
|
107
110
|
}
|
|
108
111
|
});
|
|
@@ -118,25 +121,24 @@ export function nearestPointOnProjectedLine(line, inPoint, viewport) {
|
|
|
118
121
|
type: 'Feature',
|
|
119
122
|
geometry: {
|
|
120
123
|
type: 'Point',
|
|
121
|
-
|
|
122
|
-
coordinates: wmViewport.unproject([x0, y0, z0]),
|
|
124
|
+
coordinates: wmViewport.unproject([x0, y0, z0])
|
|
123
125
|
},
|
|
124
126
|
properties: {
|
|
125
127
|
// TODO: calculate the distance in proper units
|
|
126
128
|
dist: minDistance,
|
|
127
|
-
index: index - 1
|
|
128
|
-
}
|
|
129
|
+
index: index - 1
|
|
130
|
+
}
|
|
129
131
|
};
|
|
130
132
|
}
|
|
131
133
|
/**
|
|
132
134
|
* Inserts toInsert string into base string before insertBefore string.
|
|
133
135
|
* @param base A string to insert into.
|
|
134
|
-
* @param
|
|
136
|
+
* @param insertBeforeText A sub string in `base` string to insert before.
|
|
135
137
|
* @param toInsert A string to insert.
|
|
136
138
|
* @returns Combined string. `base` string if `insertBefore` string isn't found.
|
|
137
139
|
*/
|
|
138
|
-
export function insertBefore(base,
|
|
139
|
-
const at = base.indexOf(
|
|
140
|
+
export function insertBefore(base, insertBeforeText, toInsert) {
|
|
141
|
+
const at = base.indexOf(insertBeforeText);
|
|
140
142
|
if (at < 0) {
|
|
141
143
|
return base;
|
|
142
144
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl-community/editable-layers",
|
|
3
3
|
"description": "A suite of 3D-enabled data editing overlays, suitable for deck.gl",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "9.0.
|
|
5
|
+
"version": "9.0.3",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/visgl/deck.gl-community"
|
|
@@ -62,23 +62,24 @@
|
|
|
62
62
|
"@turf/transform-scale": "^6.5.0",
|
|
63
63
|
"@turf/transform-translate": "^6.5.0",
|
|
64
64
|
"@turf/union": "^6.5.0",
|
|
65
|
+
"@types/geojson": "^7946.0.14",
|
|
65
66
|
"cubic-hermite-spline": "^1.0.1",
|
|
66
67
|
"eventemitter3": "^5.0.0",
|
|
67
|
-
"geojson-types": "^2.0.1",
|
|
68
68
|
"lodash.throttle": "^4.1.1",
|
|
69
69
|
"uuid": "9.0.0",
|
|
70
70
|
"viewport-mercator-project": ">=6.2.3"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@deck.gl/
|
|
74
|
-
"@deck.gl/
|
|
75
|
-
"@deck.gl/
|
|
76
|
-
"@deck.gl/layers": "
|
|
73
|
+
"@deck.gl-community/layers": "^9.0.0",
|
|
74
|
+
"@deck.gl/core": "^9.0.12",
|
|
75
|
+
"@deck.gl/extensions": "^9.0.12",
|
|
76
|
+
"@deck.gl/geo-layers": "^9.0.12",
|
|
77
|
+
"@deck.gl/layers": "^9.0.12",
|
|
77
78
|
"@deck.gl/mesh-layers": ">=9.0.6",
|
|
78
|
-
"@luma.gl/constants": ">=9.0.
|
|
79
|
-
"@luma.gl/core": ">=9.0.
|
|
80
|
-
"@luma.gl/engine": ">=9.0.
|
|
79
|
+
"@luma.gl/constants": ">=9.0.12",
|
|
80
|
+
"@luma.gl/core": ">=9.0.12",
|
|
81
|
+
"@luma.gl/engine": ">=9.0.12",
|
|
81
82
|
"@math.gl/core": ">=4.0.1"
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "8955b0da47771f3524b65360243ee246abeb3660"
|
|
84
85
|
}
|
package/src/constants.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// deck.gl-community
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* A multiplier for screen-space width/scale for Arc, Line, Icon and Text layers.
|
|
3
7
|
* Required in order to maintain the same appearance after upgrading to deck.gl v8.5.
|
|
@@ -11,5 +15,5 @@ export const PROJECTED_PIXEL_SIZE_MULTIPLIER = 2 / 3;
|
|
|
11
15
|
export const UNIT = {
|
|
12
16
|
common: 0,
|
|
13
17
|
meters: 1,
|
|
14
|
-
pixels: 2
|
|
18
|
+
pixels: 2
|
|
15
19
|
};
|