@types/leaflet-draw
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -163,3 +163,3 @@ // Type definitions for leaflet-draw 1.0 | ||
*/ | ||
edit?: DrawOptions.EditHandlerOptions | false | undefined; | ||
edit?: Omit<EditToolbar.EditHandlerOptions, 'featureGroup'> | false | undefined; | ||
@@ -450,42 +450,2 @@ /** | ||
interface EditPolyOptions { | ||
/** | ||
* This is the FeatureGroup that stores all editable shapes | ||
* THIS IS REQUIRED FOR THE EDIT TOOLBAR TO WORK | ||
*/ | ||
featureGroup: FeatureGroup; | ||
/** | ||
* Edit handler options. Set to false to disable handler. | ||
*/ | ||
edit: EditHandlerOptions; | ||
/** | ||
* Delete handler options. Set to false to disable handler. | ||
*/ | ||
remove: any; | ||
/** | ||
* Set polygon editing options | ||
*/ | ||
poly: EditPolyOptions; | ||
/** | ||
* Determines if line segments can cross | ||
* | ||
* @default true | ||
*/ | ||
allowIntersection: boolean; | ||
} | ||
interface EditHandlerOptions { | ||
/** | ||
* The path options for how the layers will look while in edit mode. | ||
* If this is set to null the editable path options will not be set. | ||
* | ||
* @default { dashArray: '10, 10', fill: true, fillColor: '#fe57a1', fillOpacity: 0.1, maintainColor: false } | ||
*/ | ||
selectedPathOptions?: PathOptions | undefined; | ||
} | ||
interface DrawErrorOptions { | ||
@@ -552,3 +512,2 @@ color?: string | undefined; | ||
| DrawOptions.RectangleOptions | DrawOptions.MarkerOptions | ||
| DrawOptions.EditHandlerOptions | ||
): void; | ||
@@ -560,3 +519,2 @@ | ||
| DrawOptions.RectangleOptions | DrawOptions.MarkerOptions | ||
| DrawOptions.EditHandlerOptions | ||
): void; | ||
@@ -807,5 +765,37 @@ } | ||
namespace EditToolbar { | ||
class Edit extends Toolbar { | ||
constructor(map: DrawMap, options?: ToolbarOptions); | ||
interface EditPolyOptions extends EditOptions.EditPolyVerticesEditOptions { | ||
/** | ||
* Determines if line segments can cross | ||
* | ||
* @default true | ||
*/ | ||
allowIntersection?: boolean; | ||
} | ||
interface EditHandlerOptions { | ||
/** | ||
* This is the FeatureGroup that stores all editable shapes. | ||
* THIS IS REQUIRED FOR THE EDIT TOOLBAR TO WORK | ||
* | ||
* @default null | ||
*/ | ||
featureGroup: FeatureGroup; | ||
/** | ||
* The options for the polygon layer in editing mode | ||
* | ||
* @default null | ||
*/ | ||
poly?: EditPolyOptions; | ||
/** | ||
* The path options for how the layers will look while in edit mode. | ||
* If this is set to null the editable path options will not be set. | ||
* | ||
* @default { dashArray: '10, 10', fill: true, fillColor: '#fe57a1', fillOpacity: 0.1, maintainColor: false } | ||
*/ | ||
selectedPathOptions?: PathOptions | undefined; | ||
} | ||
class Edit extends Handler { | ||
constructor(map: DrawMap, options?: EditHandlerOptions); | ||
revertLayers(): void; | ||
@@ -816,4 +806,4 @@ | ||
class Delete extends Toolbar { | ||
constructor(map: DrawMap, options?: ToolbarOptions); | ||
class Delete extends Handler { | ||
constructor(map: DrawMap, options?: { featureGroup: FeatureGroup }); | ||
@@ -820,0 +810,0 @@ revertLayers(): void; |
{ | ||
"name": "@types/leaflet-draw", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "TypeScript definitions for leaflet-draw", | ||
@@ -40,4 +40,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-draw", | ||
}, | ||
"typesPublisherContentHash": "be0d5c6f229b1f0a4c977fac1a3a9e6d6cdac8ca8506a2c4017c823f46764ad7", | ||
"typeScriptVersion": "3.6" | ||
"typesPublisherContentHash": "48595d4dc7e11f6b8275f63a71a4d1043ce5dfe561f7e3170ee7bdcf96bb2a30", | ||
"typeScriptVersion": "4.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 08 Jul 2021 16:23:33 GMT | ||
* Last updated: Sat, 31 Dec 2022 12:33:00 GMT | ||
* Dependencies: [@types/leaflet](https://npmjs.com/package/@types/leaflet) | ||
@@ -14,0 +14,0 @@ * Global values: none |
31858
834