mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #45996 [Leaflet] GeoJSON.resetStyle() can be called without an argument by @niconoe
This commit is contained in:
parent
53e3fb2b8e
commit
f04e299e27
2
types/leaflet/index.d.ts
vendored
2
types/leaflet/index.d.ts
vendored
@ -1290,7 +1290,7 @@ export class GeoJSON<P = any> extends FeatureGroup<P> {
|
||||
* Resets the given vector layer's style to the original GeoJSON style,
|
||||
* useful for resetting style after hover events.
|
||||
*/
|
||||
resetStyle(layer: Layer): Layer;
|
||||
resetStyle(layer?: Layer): Layer;
|
||||
|
||||
/**
|
||||
* Same as FeatureGroup's setStyle method, but style-functions are also
|
||||
|
||||
@ -509,6 +509,9 @@ const styler: L.StyleFunction<MyProperties> = () => style;
|
||||
geojson.setStyle(style);
|
||||
geojson.setStyle(styler);
|
||||
|
||||
geojson.resetStyle();
|
||||
geojson.resetStyle(layer);
|
||||
|
||||
class MyMarker extends L.Marker {
|
||||
constructor() {
|
||||
super([12, 13]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user