mirror of
https://github.com/sstent/aicyclingcoach-go.git
synced 2026-01-26 17:12:23 +00:00
sync
This commit is contained in:
12
node_modules/react-leaflet/lib/Polyline.js
generated
vendored
Normal file
12
node_modules/react-leaflet/lib/Polyline.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { createElementObject, createPathComponent, extendContext } from '@react-leaflet/core';
|
||||
import { Polyline as LeafletPolyline } from 'leaflet';
|
||||
export const Polyline = createPathComponent(function createPolyline({ positions , ...options }, ctx) {
|
||||
const polyline = new LeafletPolyline(positions, options);
|
||||
return createElementObject(polyline, extendContext(ctx, {
|
||||
overlayContainer: polyline
|
||||
}));
|
||||
}, function updatePolyline(layer, props, prevProps) {
|
||||
if (props.positions !== prevProps.positions) {
|
||||
layer.setLatLngs(props.positions);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user