mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Fix(react-leaflet): Add interaction events to layer (#14085)
The `LeafletInteractionEvents` typing was missing from `LayerProps` , which caused issues with eg. `FeatureGroup`. See details here (http://leafletjs.com/reference-1.0.0.html#layer) Please fill in this template. - [x] Make your PR against the master branch. - [x] Use a meaningful title for the pull request. Include the name of the package modified. - [x] Test the change in your own code. (Compile and run.) - [x] Follow the advice from the readme. - [x] Avoid common mistakes. - [x] Run tsc without errors. Select one of these and delete the others: If changing an existing definition: - [x] Provide a URL to documentation or source code which provides context for the suggested changes: <> N/A Increase the version number in the header if appropriate. N/A If you are making substantial changes, consider adding a tslint.json containing { "extends": "../tslint.json" }.
This commit is contained in:
committed by
Mohamed Hegazy
parent
a1ab5cd45f
commit
874b372f1f
4
react-leaflet/index.d.ts
vendored
4
react-leaflet/index.d.ts
vendored
@@ -95,7 +95,7 @@ declare const Pane: React.ComponentClass<PaneProps>;
|
||||
|
||||
|
||||
//There is no Layer class, these are the base props for all layers on the map
|
||||
interface LayerProps {
|
||||
interface LayerProps extends LeafletInteractionEvents {
|
||||
onadd?: (event: Leaflet.Event) => void;
|
||||
onremove?: (event: Leaflet.Event) => void;
|
||||
|
||||
@@ -109,7 +109,7 @@ interface LayerProps {
|
||||
}
|
||||
|
||||
|
||||
interface MarkerProps extends LayerProps, LeafletInteractionEvents, LeafletDraggingEvents {
|
||||
interface MarkerProps extends LayerProps, LeafletDraggingEvents {
|
||||
position: Leaflet.LatLngExpression;
|
||||
draggable?: boolean;
|
||||
icon?: Leaflet.Icon;
|
||||
|
||||
Reference in New Issue
Block a user