leaflet-editable
Advanced tools
Comparing version 1.1.0 to 1.2.0
# 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 @@ |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
312849
4907
47