From 71f6a2ebbff3dc811bcb5203fed49943d9ed8542 Mon Sep 17 00:00:00 2001 From: Jon West Date: Thu, 13 Oct 2016 20:00:49 -0500 Subject: [PATCH] Added Changelog, breaking changes, updating Readme and packages --- BREAKINGCHANGES.md | 28 +++++++++++++++++++++++----- CHANGELOG.md | 15 +++++++++++++++ README.md | 4 ++++ bower.json | 18 +++++++++--------- package.json | 24 +++++++++++++----------- 5 files changed, 64 insertions(+), 25 deletions(-) diff --git a/BREAKINGCHANGES.md b/BREAKINGCHANGES.md index 1c83580a6..3ff64698d 100644 --- a/BREAKINGCHANGES.md +++ b/BREAKINGCHANGES.md @@ -1,6 +1,24 @@ +# How to upgrade from 0.3 to 0.4 + +There are a number of changes to the plugin in 0.4 that may break peoples implementations of Leaflet.draw 0.3. + +### L.Tooltip is now L.Draw.Tooltip + +``` + var tooltip = new L.Tooltip(map); +``` + +Is now + +``` + var tooltip = new L.Draw.Tooltip(map); +``` + +See ./src/Tooltip.js + # How to upgrade from 0.1 to 0.2 -There are a number of changes to the plugin in 0.2 that may break peoples implementations of Leaflet.draw 0.1. If you I will try my best to list any changes here. +There are a number of changes to the plugin in 0.2 that may break peoples implementations of Leaflet.draw 0.1. I will try my best to list any changes here. ## Event consolidation @@ -10,7 +28,7 @@ The vector or marker is accessed by the `layer` property of the event arguments, #### New way -````js +```js map.on('draw:created', function (e) { var type = e.layerType, layer = e.layer; @@ -21,11 +39,11 @@ map.on('draw:created', function (e) { map.addLayer(layer); }); -```` +``` #### Old way -````js +```js map.on('draw:poly-created', function (e) { map.addLayer(e.poly); }); @@ -39,7 +57,7 @@ map.on('draw:marker-created', function (e) { e.marker.bindPopup('A popup!'); map.addLayer(e.marker); }); -```` +``` ## Draw handler started/stopped event change diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ce7d84f..af98d0c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ Leaflet.draw Changelog An in-progress version being developed on the master branch. +## 0.4.0 (October 13, 2016) + +### Improvements + + * Add support for Leaflet 1.0.0+ + +### Bugfixes + + * New L.Draw.Tooltip to mitigate L.Tooltip collision + +### Potential Issues + + * Several namespace changes, see BREAKINGCHANGES.md + * Cross support for both 0.7.0 and 1.0.0 + ## 0.3.0 (March 09, 2016) ### Improvements diff --git a/README.md b/README.md index f84d83211..dc879d626 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ Adds support for drawing and editing vectors and markers on [Leaflet maps](https Supports [Leaflet](https://github.com/Leaflet/Leaflet/releases) 0.7.x and 1.0.0+ branches. +- Full Demo for Leaflet 1.0.0+: http://leaflet.github.io/Leaflet.draw/examples/full.html + +- Full Demo for Leaflet 0.7.0+: http://leaflet.github.io/Leaflet.draw/examples/0.7.x/full.html + #### Upgrading from Leaflet.draw 0.1 Leaflet.draw 0.2.0 changes a LOT of things from 0.1. Please see [BREAKING CHANGES](https://github.com/Leaflet/Leaflet.draw/blob/master/BREAKINGCHANGES.md) for how to upgrade. diff --git a/bower.json b/bower.json index 528403383..44a804b9f 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "leaflet-draw", "description": "Vector drawing plugin for Leaflet", - "version": "0.3.1", + "version": "0.3.2", "main": [ "dist/leaflet.draw-src.js", "dist/leaflet.draw.css", @@ -51,13 +51,13 @@ "leaflet": "^0.7.0" }, "devDependencies": { - "jshint": "~2.3.0", - "uglify-js": "~2.4.3", - "jake": "~0.7.4", - "mocha": "~1.14.0", - "happen": "~0.1.3", - "karma": "^0.12.19", - "karma-mocha": "~0.1.0", - "karma-coverage": "~0.1.3" + "jshint": "~2.9.3", + "uglify-js": "~2.7.3", + "jake": "~8.0.15", + "mocha": "~3.1.2", + "happen": "~0.3.1", + "karma": "^1.3.0", + "karma-mocha": "~1.2.0", + "karma-coverage": "~1.1.1" } } diff --git a/package.json b/package.json index 506119a87..0117073ce 100644 --- a/package.json +++ b/package.json @@ -3,17 +3,17 @@ "version": "0.3.2", "description": "Vector drawing plugin for Leaflet", "devDependencies": { - "happen": "~0.1.3", - "jake": "~0.7.4", - "jshint": "~2.3.0", - "karma": "^0.12.19", - "karma-coverage": "~0.1.3", - "karma-mocha": "~0.1.0", - "karma-phantomjs-launcher": "^0.1.4", - "phantomjs": "~2.1.3", + "happen": "^0.3.1", + "jake": "^8.0.15", + "jshint": "^2.9.3", + "karma": "^1.3.0", + "karma-coverage": "^1.1.1", + "karma-mocha": "^1.2.0", + "karma-phantomjs-launcher": "^1.0.2", "leaflet": "~0.7.0", - "mocha": "~1.14.0", - "uglify-js": "~2.4.3" + "mocha": "^3.1.2", + "phantomjs": "^2.1.7", + "uglify-js": "^2.7.3" }, "main": "dist/leaflet.draw.js", "directories": { @@ -35,11 +35,13 @@ "drawing", "draw" ], - "author": "Jacob Toye", "contributors": [ { "name": "Jon West", "email": "ddproxy@gmail.com" + }, + { + "name": "Jacob Toye" } ], "license": "MIT",