mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-13 08:57:26 +08:00
Merge pull request #19754 from YunS-Stacy/master
[leaflet-draw] Add Draw Handlers
This commit is contained in:
58
types/leaflet-draw/index.d.ts
vendored
58
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,60 @@ declare module 'leaflet' {
|
||||
const DELETESTART: string;
|
||||
const DELETESTOP: string;
|
||||
}
|
||||
|
||||
class Feature extends Handler {
|
||||
initialize(
|
||||
map: Map,
|
||||
options: DrawOptions.PolylineOptions | DrawOptions.PolygonOptions | DrawOptions.RectangleOptions | DrawOptions.MarkerOptions | DrawOptions.EditHandlerOptions | DrawOptions.DeleteHandlerOptions
|
||||
): void;
|
||||
|
||||
setOptions(
|
||||
options: DrawOptions.PolylineOptions | DrawOptions.PolygonOptions | DrawOptions.RectangleOptions | DrawOptions.MarkerOptions | DrawOptions.EditHandlerOptions | DrawOptions.DeleteHandlerOptions
|
||||
): 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 {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user