mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-28 16:45:10 +08:00
added leaflet-draw handlers
This commit is contained in:
68
types/leaflet-draw/index.d.ts
vendored
68
types/leaflet-draw/index.d.ts
vendored
@@ -1,6 +1,8 @@
|
||||
// Type definitions for leaflet-draw 0.4
|
||||
// Project: https://github.com/Leaflet/Leaflet.draw
|
||||
// Definitions by: Matt Guest <https://github.com/matt-guest>, Ryan Blace <https://github.com/reblace>
|
||||
// Definitions by: Matt Guest <https://github.com/matt-guest>
|
||||
// Ryan Blace <https://github.com/reblace>
|
||||
// Yun Shi <https://github.com/YunS-Stacy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -252,6 +254,70 @@ declare module 'leaflet' {
|
||||
const DELETESTART: string;
|
||||
const DELETESTOP: string;
|
||||
}
|
||||
|
||||
class Feature {
|
||||
initialize(): void;
|
||||
/**
|
||||
* Enables this handler.
|
||||
*/
|
||||
enable(): void;
|
||||
/**
|
||||
* Add's event listeners to this handler
|
||||
*/
|
||||
addHooks(): void;
|
||||
/**
|
||||
* Removes event listeners from this handler
|
||||
*/
|
||||
removeHooks(): void;
|
||||
/**
|
||||
* Sets new options to this handler
|
||||
*/
|
||||
setOptions(options: DrawOptions.EditHandlerOptions): void;
|
||||
}
|
||||
|
||||
class SimpleShape extends Feature { }
|
||||
|
||||
class Marker extends Feature {
|
||||
constructor(
|
||||
map: Map,
|
||||
options?: DrawOptions.MarkerOptions
|
||||
)
|
||||
}
|
||||
|
||||
class CircleMarker extends Feature {
|
||||
constructor(
|
||||
map: Map,
|
||||
options?: DrawOptions.MarkerOptions
|
||||
)
|
||||
}
|
||||
|
||||
class Circle extends Feature {
|
||||
constructor(
|
||||
map: Map,
|
||||
options?: DrawOptions.CircleOptions
|
||||
)
|
||||
}
|
||||
|
||||
class Polyline extends Feature {
|
||||
constructor(
|
||||
map: Map,
|
||||
options?: DrawOptions.PolylineOptions
|
||||
)
|
||||
}
|
||||
|
||||
class Rectangle extends Feature {
|
||||
constructor(
|
||||
map: Map,
|
||||
options?: DrawOptions.RectangleOptions
|
||||
)
|
||||
}
|
||||
|
||||
class Polygon extends Feature {
|
||||
constructor(
|
||||
map: Map,
|
||||
options?: DrawOptions.PolygonOptions
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
namespace DrawEvents {
|
||||
|
||||
Reference in New Issue
Block a user