Skip to content

Commit

Permalink
Use freehand polygon tool for a common repo
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Mar 25, 2024
1 parent 7afd039 commit dfeead7
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 379 deletions.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"govuk-svelte": "github:acteng/govuk-svelte",
"humanize-string": "^3.0.0",
"js-cookie": "^3.0.5",
"maplibre-draw-polygon": "github:dabreegster/maplibre-draw-polygon",
"maplibre-gl": "^4.0.2",
"read-excel-file": "^5.7.1",
"route-snapper": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/draw/polygon/PolygonControls.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { polygonTool } from "lib/draw/stores";
import { SecondaryButton } from "govuk-svelte";
import { undoLength } from "./stores";
import { undoLength } from "maplibre-draw-polygon";
function undo() {
$polygonTool!.undo();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/draw/polygon/PolygonToolLayer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { circleRadius, colors } from "colors";
import { isLine, isPoint, isPolygon, layerId } from "lib/maplibre";
import { CircleLayer, FillLayer, GeoJSON, LineLayer } from "svelte-maplibre";
import { polygonToolGj } from "./stores";
import { polygonToolGj } from "maplibre-draw-polygon";
</script>

<GeoJSON data={$polygonToolGj}>
Expand Down
Loading

0 comments on commit dfeead7

Please sign in to comment.