diff --git a/CHANGELOG.md b/CHANGELOG.md index 34365bd..1950f9d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.9.1] - 2021-11-06 +### Fixed +- Fix bug with empty curve when using canvas renderer #44 + ## [0.9.0] - 2021-11-03 ### Added - Add `getLatLngs` method (alias to `getPath`) #43 @@ -73,7 +77,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Ability to draw Bézier curves. -[Unreleased]: https://github.com/elfalem/Leaflet.curve/compare/v0.9.0...HEAD +[Unreleased]: https://github.com/elfalem/Leaflet.curve/compare/v0.9.1...HEAD +[0.9.1]: https://github.com/elfalem/Leaflet.curve/compare/v0.9.0...v0.9.1 [0.9.0]: https://github.com/elfalem/Leaflet.curve/compare/v0.8.1...v0.9.0 [0.8.1]: https://github.com/elfalem/Leaflet.curve/compare/v0.8.0...v0.8.1 [0.8.0]: https://github.com/elfalem/Leaflet.curve/compare/v0.7.0...v0.8.0 diff --git a/package.json b/package.json index e0a9402..cfaf50a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@elfalem/leaflet-curve", - "version": "0.9.0", + "version": "0.9.1", "description": "A Leaflet plugin for drawing Bézier curves and other complex shapes.", "main": "dist/leaflet.curve.js", "types": "types/leaflet.curve.d.ts", diff --git a/src/leaflet.curve.js b/src/leaflet.curve.js index 42468ad..55a47da 100755 --- a/src/leaflet.curve.js +++ b/src/leaflet.curve.js @@ -1,5 +1,5 @@ /* - * Leaflet.curve v0.9.0 - a plugin for Leaflet mapping library. https://github.com/elfalem/Leaflet.curve + * Leaflet.curve v0.9.1 - a plugin for Leaflet mapping library. https://github.com/elfalem/Leaflet.curve * (c) elfalem 2015-2021 */ /* @@ -293,7 +293,9 @@ L.Curve = L.Path.extend({ // Needed by the `Canvas` renderer for interactivity _containsPoint: function(layerPoint) { - if (!this._bounds.isValid()) return false; + if (!this._bounds.isValid()) { + return false; + } return this._bounds.contains(this._map.layerPointToLatLng(layerPoint)); },