'use strict';
(function (factory, window) {
/*globals define, module, require*/
// define an AMD module that relies on 'leaflet'
if (typeof define === 'function' && define.amd) {
define(['leaflet'], factory);
// define a Common JS module that relies on 'leaflet'
} else if (typeof exports === 'object') {
module.exports = factory(require('leaflet'));
}
// attach your plugin to the global 'L' variable
if(typeof window !== 'undefined' && window.L){
factory(window.L);
}
}(function (L) {
// 🍂miniclass CancelableEvent (Event objects)
// 🍂method cancel()
// Cancel any subsequent action.
// 🍂miniclass VertexEvent (Event objects)
// 🍂property vertex: VertexMarker
// The vertex that fires the event.
// 🍂miniclass ShapeEvent (Event objects)
// 🍂property shape: Array
// The shape (LatLngs array) subject of the action.
// 🍂miniclass CancelableVertexEvent (Event objects)
// 🍂inherits VertexEvent
// 🍂inherits CancelableEvent
// 🍂miniclass CancelableShapeEvent (Event objects)
// 🍂inherits ShapeEvent
// 🍂inherits CancelableEvent
// 🍂miniclass LayerEvent (Event objects)
// 🍂property layer: object
// The Layer (Marker, Polyline…) subject of the action.
// 🍂namespace Editable; 🍂class Editable; 🍂aka L.Editable
// Main edition handler. By default, it is attached to the map
// as `map.editTools` property.
// Leaflet.Editable is made to be fully extendable. You have three ways to customize
// the behaviour: using options, listening to events, or extending.
L.Editable = L.Evented.extend({
statics: {
FORWARD: 1,
BACKWARD: -1
},
options: {
// You can pass them when creating a map using the `editOptions` key.
// 🍂option zIndex: int = 1000
// The default zIndex of the editing tools.
zIndex: 1000,
// 🍂option polygonClass: class = L.Polygon
// Class to be used when creating a new Polygon.
polygonClass: L.Polygon,
// 🍂option polylineClass: class = L.Polyline
// Class to be used when creating a new Polyline.
polylineClass: L.Polyline,
// 🍂option markerClass: class = L.Marker
// Class to be used when creating a new Marker.
markerClass: L.Marker,
// 🍂option rectangleClass: class = L.Rectangle
// Class to be used when creating a new Rectangle.
rectangleClass: L.Rectangle,
// 🍂option circleClass: class = L.Circle
// Class to be used when creating a new Circle.
circleClass: L.Circle,
// 🍂option drawingCSSClass: string = 'leaflet-editable-drawing'
// CSS class to be added to the map container while drawing.
drawingCSSClass: 'leaflet-editable-drawing',
// 🍂option drawingCursor: const = 'crosshair'
// Cursor mode set to the map while drawing.
drawingCursor: 'crosshair',
// 🍂option editLayer: Layer = new L.LayerGroup()
// Layer used to store edit tools (vertex, line guide…).
editLayer: undefined,
// 🍂option featuresLayer: Layer = new L.LayerGroup()
// Default layer used to store drawn features (Marker, Polyline…).
featuresLayer: undefined,
// 🍂option polylineEditorClass: class = PolylineEditor
// Class to be used as Polyline editor.
polylineEditorClass: undefined,
// 🍂option polygonEditorClass: class = PolygonEditor
// Class to be used as Polygon editor.
polygonEditorClass: undefined,
// 🍂option markerEditorClass: class = MarkerEditor
// Class to be used as Marker editor.
markerEditorClass: undefined,
|