This commit is contained in:
2025-09-11 07:45:47 -07:00
parent 955946e79d
commit a9425720e9
2759 changed files with 0 additions and 294955 deletions

View File

@@ -1,12 +0,0 @@
import { createElementObject, createPathComponent, extendContext } from '@react-leaflet/core';
import { Polygon as LeafletPolygon } from 'leaflet';
export const Polygon = createPathComponent(function createPolygon({ positions , ...options }, ctx) {
const polygon = new LeafletPolygon(positions, options);
return createElementObject(polygon, extendContext(ctx, {
overlayContainer: polygon
}));
}, function updatePolygon(layer, props, prevProps) {
if (props.positions !== prevProps.positions) {
layer.setLatLngs(props.positions);
}
});