Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed Jan 12, 2019
1 parent 0020c97 commit b8af255
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 79 deletions.
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug-in-v1.md

This file was deleted.

8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug-in-v2.md
@@ -1,6 +1,6 @@
---
name: Bug in v2
about: Report a bug in version 2 of the library
name: Bug report
about: Report a bug
---

## Bug report in v2
Expand All @@ -12,8 +12,8 @@ Please make sure to check the following boxes before submitting an issue.\

- [ ] All peer dependencies are installed: React, ReactDOM and Leaflet.
- [ ] Using a supported version of React and ReactDOM (v16.3.0 minimum).
- [ ] Using the supported version of Leaflet (v1.3.x) and its corresponding CSS file is loaded.
- [ ] Using the [latest stable v2 version of React-Leaflet](https://github.com/PaulLeCam/react-leaflet/releases) - **not v1**.
- [ ] Using the supported version of Leaflet (v1.4.x) and its corresponding CSS file is loaded.
- [ ] Using the [latest version of React-Leaflet](https://github.com/PaulLeCam/react-leaflet/releases) - **not v1.x**.
- [ ] The issue has not already been reported.
- [ ] Make sure you have followed the [quick start guide](http://leafletjs.com/examples/quick-start.html) for Leaflet.
- [ ] Make sure you have fully read the [documentation](https://react-leaflet.js.org/docs/en/intro.html) and that you understand the [limitations](https://react-leaflet.js.org/docs/en/intro.html#limitations).
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,11 @@
## v2.2.0 (2019-01-12)

- Updated Leaflet dependency to v1.4.
- Fixed duplicate element creation in `Path` ([PR #549](https://github.com/PaulLeCam/react-leaflet/pull/549) by _vadzim_).
- Changed `whenReady` logic in `Map` to get triggered after React reference is bound.
- [internal] Replaced `lodash` with `fast-deep-equal` and vanilla JS implementations ([PR #554](https://github.com/PaulLeCam/react-leaflet/pull/554) by _jtfell_).
- [website] Added `react-leaflet-semicircle` plugin ([PR #552](https://github.com/PaulLeCam/react-leaflet/pull/552) by _clementallen_).

## v2.1.4 (2018-12-22)

Fixed event handlers changes in `Map` component.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Paul Le Cam and contributors
Copyright (c) 2015-present Paul Le Cam and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "react-leaflet",
"version": "2.1.4",
"version": "2.2.0",
"description": "React components for Leaflet maps",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -55,7 +55,7 @@
"warning": "^4.0.0"
},
"peerDependencies": {
"leaflet": "^1.3.0",
"leaflet": "^1.4.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
},
Expand Down Expand Up @@ -85,22 +85,22 @@
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.11.1",
"file-loader": "^3.0.1",
"flow-bin": "^0.89.0",
"flow-bin": "^0.90.0",
"flow-copy-source": "^2.0.2",
"flow-typed": "^2.5.1",
"jest": "^23.6.0",
"leaflet": "^1.3.4",
"leaflet": "^1.4.0",
"prettier": "^1.15.3",
"prettier-eslint": "^8.8.2",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"rimraf": "^2.6.2",
"rollup": "^0.68.1",
"rollup": "^1.1.0",
"rollup-plugin-babel": "^4.1.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-uglify": "^6.0.0",
"rollup-plugin-uglify": "^6.0.1",
"webpack": "^4.28.1",
"webpack-serve": "^2.0.3"
},
Expand Down
12 changes: 8 additions & 4 deletions src/Map.js
Expand Up @@ -105,6 +105,7 @@ export default class Map extends MapEvented<LeafletElement, Props> {
zoom: undefined,
}

_ready: boolean = false
_updating: boolean = false

constructor(props: Props) {
Expand Down Expand Up @@ -276,10 +277,6 @@ export default class Map extends MapEvented<LeafletElement, Props> {
this.leafletElement.fitBounds(props.bounds, props.boundsOptions)
}

if (this.props.whenReady) {
this.leafletElement.whenReady(this.props.whenReady)
}

this.contextValue = {
layerContainer: this.leafletElement,
map: this.leafletElement,
Expand All @@ -290,6 +287,13 @@ export default class Map extends MapEvented<LeafletElement, Props> {
}

componentDidUpdate(prevProps: Props) {
if (this._ready === false) {
this._ready = true
if (this.props.whenReady) {
this.leafletElement.whenReady(this.props.whenReady)
}
}

super.componentDidUpdate(prevProps)
this.updateLeafletElement(prevProps, this.props)
}
Expand Down
1 change: 1 addition & 0 deletions website/versioned_docs/version-v2/plugins.md
Expand Up @@ -41,6 +41,7 @@ open pull requests to update this list!
| [`react-leaflet-pane`](https://www.npmjs.com/package/react-leaflet-pane) | unknown |
| [`react-leaflet-rotatedmarker`](https://www.npmjs.com/package/react-leaflet-rotatedmarker) | unknown |
| [`react-leaflet-search`](https://www.npmjs.com/package/react-leaflet-search) | **yes** |
| [`react-leaflet-semicircle`](https://www.npmjs.com/package/react-leaflet-semicircle) | **yes** |
| [`react-leaflet-shapefile`](https://www.npmjs.com/package/react-leaflet-shapefile) | **no** |
| [`react-leaflet-sidebarv2`](https://www.npmjs.com/package/react-leaflet-sidebarv2) | unknown |
| [`react-leaflet-sidetabs`](https://www.npmjs.com/package/react-leaflet-sidetabs) | **yes** |
Expand Down
67 changes: 34 additions & 33 deletions yarn.lock
Expand Up @@ -1049,7 +1049,7 @@ acorn@^5.0.0, acorn@^5.5.0, acorn@^5.5.3, acorn@^5.6.2:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==

acorn@^6.0.1, acorn@^6.0.2:
acorn@^6.0.1, acorn@^6.0.2, acorn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a"
integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==
Expand Down Expand Up @@ -1553,9 +1553,9 @@ bcrypt-pbkdf@^1.0.0:
tweetnacl "^0.14.3"

before-after-hook@^1.1.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.3.1.tgz#1c23c7789ad3ed76b06c9cb38d1169ac094c3704"
integrity sha512-BIjg60OP/sQvG7Q2L9Xkc77gyyFw1B4T73LIfZVQtXbutJinC1+t2HRl4qeR3EWAmY+tA6z9vpRi02q6ZXyluQ==
version "1.3.2"
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.3.2.tgz#7bfbf844ad670aa7a96b5a4e4e15bd74b08ed66b"
integrity sha512-zyPgY5dgbf99c0uGUjhY4w+mxqEGxPKg9RQDl34VvrVh2bM31lFN+mwR1ZHepq/KA3VCPk1gwJZL6IIJqjLy2w==

big-integer@^1.6.17:
version "1.6.40"
Expand Down Expand Up @@ -1718,12 +1718,12 @@ browserify-zlib@^0.2.0:
pako "~1.0.5"

browserslist@^4.3.4:
version "4.3.7"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.7.tgz#f1de479a6466ea47a0a26dcc725e7504817e624a"
integrity sha512-pWQv51Ynb0MNk9JGMCZ8VkM785/4MQNXiFYtPqI7EEP0TJO+/d/NqRVn1uiAN0DNbnlUSpL2sh16Kspasv3pUQ==
version "4.4.0"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.4.0.tgz#7050d1412cbfc5274aba609ed5e50359ca1a5fdf"
integrity sha512-tQkHS8VVxWbrjnNDXgt7/+SuPJ7qDvD0Y2e6bLtoQluR2SPvlmPUcfcU75L1KAalhqULlIFJlJ6BDfnYyJxJsw==
dependencies:
caniuse-lite "^1.0.30000925"
electron-to-chromium "^1.3.96"
caniuse-lite "^1.0.30000928"
electron-to-chromium "^1.3.100"
node-releases "^1.1.3"

bser@^2.0.0:
Expand Down Expand Up @@ -1895,7 +1895,7 @@ camelize@^1.0.0:
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=

caniuse-lite@^1.0.30000925:
caniuse-lite@^1.0.30000928:
version "1.0.30000928"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000928.tgz#805e828dc72b06498e3683a32e61c7507fd67b88"
integrity sha512-aSpMWRXL6ZXNnzm8hgE4QDLibG5pVJ2Ujzsuj3icazlIkxXkPXtL+BWnMx6FBkWmkZgBHGUxPZQvrbRw2ZTxhg==
Expand Down Expand Up @@ -2631,10 +2631,10 @@ ee-first@1.1.1:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=

electron-to-chromium@^1.3.96:
version "1.3.100"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.100.tgz#899fb088def210aee6b838a47655bbb299190e13"
integrity sha512-cEUzis2g/RatrVf8x26L8lK5VEls1AGnLHk6msluBUg/NTB4wcXzExTsGscFq+Vs4WBBU2zbLLySvD4C0C3hwg==
electron-to-chromium@^1.3.100:
version "1.3.102"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.102.tgz#3ac43a037c8a63bca3dfa189eb3d90f097196787"
integrity sha512-2nzZuXw/KBPnI3QX3UOCSRvJiVy7o9+VHRDQ3D/EHCvVc89X6aj/GlNmEgiR2GBIhmSWXIi4W1M5okA5ScSlNg==

elliptic@^6.0.0:
version "6.4.1"
Expand Down Expand Up @@ -3358,10 +3358,10 @@ flat-cache@^1.2.1:
rimraf "~2.6.2"
write "^0.2.1"

flow-bin@^0.89.0:
version "0.89.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.89.0.tgz#6bd29c2af7e0f429797f820662f33749105c32fa"
integrity sha512-DkO4PsXYrl53V6G5+t5HbRMC5ajYUQej2LEGPUZ+j9okTb41Sn5j9vfxsCpXMEAslYnQoysHhYu4GUZsQX/DrQ==
flow-bin@^0.90.0:
version "0.90.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.90.0.tgz#733b6d29a8c8a22b9a5d273611d9a8402faf3445"
integrity sha512-/syDchjhLLL7nELK1ggyWJifGXuMCTz74kvkjR1t9DcmasMrilLl9qAAotsACcNb98etEEJpsCrvP7WL64kadw==

flow-copy-source@^2.0.2:
version "2.0.2"
Expand Down Expand Up @@ -5090,7 +5090,7 @@ lcid@^2.0.0:
dependencies:
invert-kv "^2.0.0"

leaflet@^1.3.4:
leaflet@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.4.0.tgz#d5f56eeb2aa32787c24011e8be4c77e362ae171b"
integrity sha512-x9j9tGY1+PDLN9pcWTx9/y6C5nezoTMB8BLK5jTakx+H7bPlnbCHfi9Hjg+Qt36sgDz/cb9lrSpNQXmk45Tvhw==
Expand Down Expand Up @@ -6992,10 +6992,10 @@ rollup-plugin-replace@^2.1.0:
minimatch "^3.0.2"
rollup-pluginutils "^2.0.1"

rollup-plugin-uglify@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.0.tgz#15aa8919e5cdc63b7cfc9319c781788b40084ce4"
integrity sha512-XtzZd159QuOaXNvcxyBcbUCSoBsv5YYWK+7ZwUyujSmISst8avRfjWlp7cGu8T2O52OJnpEBvl+D4WLV1k1iQQ==
rollup-plugin-uglify@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.1.tgz#f8d8e0309104af33981ec0956670b0bd7fac75f5"
integrity sha512-Mo4fFTof41Ij401wGl7rJxir8b/I9fHfaNeLi9FQAa8aFatQdmvoWR5nEixTmdk8ycbB8p1owYGru+g+cvrH0Q==
dependencies:
"@babel/code-frame" "^7.0.0"
jest-worker "^23.2.0"
Expand All @@ -7010,13 +7010,14 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.3:
estree-walker "^0.5.2"
micromatch "^2.3.11"

rollup@^0.68.1:
version "0.68.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.68.2.tgz#c26afb5d981ca7a1a32f76087dbde9dad4fcc653"
integrity sha512-WgjNCXYv7ZbtStIap1+tz4pd2zwz0XYN//OILwEY6dINIFLVizK1iWdu+ZtUURL/OKnp8Lv2w8FBds8YihzX7Q==
rollup@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.1.0.tgz#461a7534b55be48aa4a6e6810a1543a5769e75d1"
integrity sha512-NK03gkkOz0CchHBMGomcNqa6U3jLNzHuWK9SI0+1FV475JA6cQxVtjlDcQoKKDNIQ3IwYumIlgoKYDEWUyFBwQ==
dependencies:
"@types/estree" "0.0.39"
"@types/node" "*"
acorn "^6.0.5"

rsvp@^3.3.3:
version "3.6.2"
Expand Down Expand Up @@ -7291,9 +7292,9 @@ source-map-support@^0.4.15:
source-map "^0.5.6"

source-map-support@^0.5.6, source-map-support@~0.5.6:
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==
version "0.5.10"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c"
integrity sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
Expand Down Expand Up @@ -7579,9 +7580,9 @@ table@^4.0.2:
string-width "^2.1.1"

table@^5.0.2:
version "5.1.1"
resolved "https://registry.yarnpkg.com/table/-/table-5.1.1.tgz#92030192f1b7b51b6eeab23ed416862e47b70837"
integrity sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw==
version "5.2.0"
resolved "https://registry.yarnpkg.com/table/-/table-5.2.0.tgz#2e38bd1f16dd3f97085ac80cdc574ad9198af04d"
integrity sha512-hAdBBAMCZl4/U3eQhsPN2Z8wRJC98lpRhDW2I86VQbPBqyj4E681VhvUkfb90qUJ4rnRfu8t4/8SGHPsAH1ygg==
dependencies:
ajv "^6.6.1"
lodash "^4.17.11"
Expand Down

0 comments on commit b8af255

Please sign in to comment.