Huge News!Announcing our $40M Series B led by Abstract Ventures.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 1.1.0 to 1.2.0

8

CHANGELOG.md
# CHANGELOG
# 1.2.0
- add `editable:vertex:mouseover` and `editable:vertex:mouseout` events (#159,
thanks to [@Git-Lior](https://github.com/Git-Lior))
- restrict large vertex icons to mobile only (cf #171, thanks to
[@tyrasd](https://github.com/Git-Lior))
- prevent to add a vertex on right click (cf #157)
# 1.1.0

@@ -4,0 +12,0 @@

18

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

@@ -16,10 +16,10 @@ "main": "src/Leaflet.Editable.js",

"devDependencies": {
"chai": "^3.5.0",
"happen": "^0.3.1",
"leafdoc": "^1.4.0",
"leaflet": "^1.2.0",
"leaflet.path.drag": "0.0.2",
"mocha": "^2.5.3",
"mocha-phantomjs-core": "^1.3.1",
"phantomjs-prebuilt": "^2.1.7"
"chai": "4.1.2",
"happen": "0.3.2",
"leafdoc": "1.4.1",
"leaflet": "1.3.4",
"leaflet.path.drag": "0.0.6",
"mocha": "5.2.0",
"mocha-phantomjs-core": "2.1.2",
"phantomjs-prebuilt": "2.1.16"
},

@@ -26,0 +26,0 @@ "repository": {

@@ -666,2 +666,27 @@ 'use strict';

it('should fire editable:drawing:mouseover after hovering over vertex', function () {
var layer = L.polygon([p2ll(100, 150), p2ll(150, 200), p2ll(200, 100), p2ll(100, 100)]).addTo(this.map),
called = 0,
call = function () {called++;};
this.map.on('editable:vertex:mouseover', call);
layer.enableEdit();
assert.equal(called, 0);
happen.at("mouseover", 100, 150);
assert.ok(called);
this.map.off('editable:vertex:mouseover', call);
layer.remove();
});
it('should fire editable:drawing:mouseout after hovering out of a vertex', function () {
var layer = L.polygon([p2ll(100, 150), p2ll(150, 200), p2ll(200, 100), p2ll(100, 100)]).addTo(this.map),
called = 0,
call = function () {called++;};
this.map.on('editable:vertex:mouseout', call);
layer.enableEdit();
assert.equal(called, 0);
happen.at("mouseout", 100, 150);
assert.ok(called);
this.map.off('editable:vertex:mouseout', call);
layer.remove();
});
});

@@ -668,0 +693,0 @@

@@ -595,2 +595,28 @@ 'use strict';

it('should fire editable:drawing:mouseover after hovering over vertex', function () {
var layer = L.polyline([p2ll(100, 100), p2ll(150, 150)]).addTo(this.map),
called = 0,
call = function () {called++;};
this.map.on('editable:vertex:mouseover', call);
layer.enableEdit();
assert.equal(called, 0);
happen.at("mouseover", 100, 100);
assert.ok(called);
this.map.off('editable:vertex:mouseover', call);
layer.remove();
});
it('should fire editable:drawing:mouseout after hovering out of a vertex', function () {
var layer = L.polyline([p2ll(100, 100), p2ll(150, 150)]).addTo(this.map),
called = 0,
call = function () {called++;};
this.map.on('editable:vertex:mouseout', call);
layer.enableEdit();
assert.equal(called, 0);
happen.at("mouseout", 100, 100);
assert.ok(called);
this.map.off('editable:vertex:mouseout', call);
layer.remove();
});
it('should send editable:drawing:click before adding vertex', function () {

@@ -597,0 +623,0 @@ var called = 0,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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