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:
Teemu Virta
2017-01-18 22:53:47 +02:00
committed by Mohamed Hegazy
parent a1ab5cd45f
commit 874b372f1f

View File

@@ -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;