diff --git a/src/modules/Poly.ts b/src/modules/Poly.ts index be31610..8c87f78 100644 --- a/src/modules/Poly.ts +++ b/src/modules/Poly.ts @@ -57,6 +57,8 @@ export class Poly { onVertexShow = (): void => this.editor.setMarkersShown(true); updateArrows = event => { + this.editor.setChanged(true); + const { latlngs } = event; this.arrowLayer.clearLayers(); @@ -168,7 +170,7 @@ export class Poly { showCoverageOnHover: false, zoomToBoundsOnClick: false, animate: false, - maxClusterRadius: 60, + maxClusterRadius: 120, // disableClusteringAtZoom: 13, iconCreateFunction: arrowClusterIcon, }); diff --git a/src/utils/arrow.ts b/src/utils/arrow.ts index 9b20a14..c61b9ac 100644 --- a/src/utils/arrow.ts +++ b/src/utils/arrow.ts @@ -1,4 +1,5 @@ import { divIcon, LatLngLiteral, Marker, marker, DivIcon } from "leaflet"; +import { dist2 } from "$utils/geom"; export const createArrow = (latlng: LatLngLiteral, angle: number): Marker => marker(latlng, { draggable: false, @@ -7,7 +8,7 @@ export const createArrow = (latlng: LatLngLiteral, angle: number): Marker => mar html: `