New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-editable

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-editable - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

example/snapping.html

5

CHANGELOG.md
# CHANGELOG
## 0.5.0
- added editable:vertex:drag event
- added editable:vertex:dragstart event
- added editable:vertex:dragend event
## 0.4.0

@@ -4,0 +9,0 @@ - Marker/Polygon/Polyline.createEditor now pass this.options.editOptions to

2

package.json
{
"name": "leaflet-editable",
"version": "0.4.0",
"version": "0.5.0",
"description": "Make geometries editable in Leaflet",

@@ -5,0 +5,0 @@ "main": "src/Leaflet.Editable.js",

@@ -60,2 +60,3 @@ # Leaflet.Editable

- [Display a tooltip near cursor while drawing](http://yohanboniface.github.io/Leaflet.Editable/example/tooltip-when-drawing.html)
- Example of [Leaflet.Snap](https://github.com/makinacorpus/Leaflet.Snap/) integration [to enable snapping](http://yohanboniface.github.io/Leaflet.Editable/example/snapping.html)

@@ -97,2 +98,6 @@

| editable:vertex:deleted | originalEvent, latlng, vertex, layer | Fired after a vertex has been deleted by user |
| editable:vertex:deleted | originalEvent, latlng, vertex, layer | Fired after a vertex has been deleted by user |
| editable:vertex:drag | originalEvent, latlng, vertex, layer | Fired when a vertex is dragged by user |
| editable:vertex:dragstart | originalEvent, latlng, vertex, layer | Fired before a vertex is dragged by user |
| editable:vertex:dragend | originalEvent, latlng, vertex, layer | Fired after a vertex is dragged by user |

@@ -143,3 +148,3 @@

Same a L.Map.
Same as L.Map.

@@ -146,0 +151,0 @@

@@ -240,3 +240,5 @@ L.Editable = L.Class.extend({

L.Marker.prototype.onAdd.call(this, map);
L.DomEvent.on(this.dragging._draggable, 'drag', this.onDrag, this);
this.on('drag', this.onDrag);
this.on('dragstart', this.onDragStart);
this.on('dragend', this.onDragEnd);
this.on('click', this.onClick);

@@ -249,2 +251,4 @@ this.on('contextmenu', this.onContextMenu);

onDrag: function (e) {
e.vertex = this;
this.editor.onVertexMarkerDrag(e);
var iconPos = L.DomUtil.getPosition(this._icon),

@@ -264,2 +268,12 @@ latlng = this._map.layerPointToLatLng(iconPos);

onDragStart: function (e) {
e.vertex = this;
this.editor.onVertexMarkerDragStart(e);
},
onDragEnd: function (e) {
e.vertex = this;
this.editor.onVertexMarkerDragEnd(e);
},
onClick: function (e) {

@@ -668,2 +682,14 @@ e.vertex = this;

onVertexMarkerDrag: function (e) {
this.fireAndForward('editable:vertex:drag', e);
},
onVertexMarkerDragStart: function (e) {
this.fireAndForward('editable:vertex:dragstart', e);
},
onVertexMarkerDragEnd: function (e) {
this.fireAndForward('editable:vertex:dragend', e);
},
startDrawing: function () {

@@ -670,0 +696,0 @@ if (!this._drawnLatLngs) this._drawnLatLngs = this.getLatLngs();

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc