Skip to content

Commit

Permalink
Added Changelog, breaking changes, updating Readme and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon West committed Oct 14, 2016
1 parent 204b672 commit f11c0a2
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 31 deletions.
28 changes: 23 additions & 5 deletions BREAKINGCHANGES.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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;
Expand All @@ -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);
});
Expand All @@ -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

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

[![Build Status](https://travis-ci.org/Leaflet/Leaflet.draw.svg?branch=master)](https://travis-ci.org/Leaflet/Leaflet.draw)

Leaflet.draw: [![Join the chat at https://gitter.im/Leaflet/Leaflet.draw](https://badges.gitter.im/Leaflet/Leaflet.draw.svg)](https://gitter.im/Leaflet/Leaflet.draw?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Leaflet: [![Gitter](https://badges.gitter.im/Leaflet/Leaflet.svg)](https://gitter.im/Leaflet/Leaflet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|Build Status|Leaflet.draw Chat|Leaflet Chat|
|---|---|---|
|[![Build Status](https://travis-ci.org/Leaflet/Leaflet.draw.svg?branch=master)](https://travis-ci.org/Leaflet/Leaflet.draw)|[![Leaflet.draw Chat](https://badges.gitter.im/Leaflet/Leaflet.draw.svg)](https://gitter.im/Leaflet/Leaflet.draw?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)|[![Leaflet Chat](https://badges.gitter.im/Leaflet/Leaflet.svg)](https://gitter.im/Leaflet/Leaflet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)|

# Leaflet.draw
Adds support for drawing and editing vectors and markers on [Leaflet maps](https://github.com/Leaflet/Leaflet). Check out the [demo](http://leaflet.github.com/Leaflet.draw/).

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.
Expand Down
18 changes: 9 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
}
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -35,11 +35,13 @@
"drawing",
"draw"
],
"author": "Jacob Toye",
"contributors": [
{
"name": "Jon West",
"email": "ddproxy@gmail.com"
},
{
"name": "Jacob Toye"
}
],
"license": "MIT",
Expand Down

0 comments on commit f11c0a2

Please sign in to comment.