-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1 #196
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Leaflet 1.0
* Set source argument in Popup creation * v0.10.1 * Animate panning and zooming * v0.10.2 * Lint 'object destructuring filter' consistently The pattern ```const { map, url, ...props } = this.props``` usually failed during linting, because the ```map``` variable is defined but not used. After adding the ```"varsIgnorePattern": "^_"``` option to the ```no-unused-vars``` rule, unused properies can be marked as: ```const { map: _, url, ...props } = this.props```. I also updated the eslint and babel-eslint dependencies, because of some relevant bugfixes. * Add babel-plugin-lodash * Introduce the concept of 'layer container', as a unified interface for L.Map and L.LayerGroup. * v0.11 - new LayersControl * Component-based LayersControl * Deprecate `onLeaflet...` format for events * React v15 * LayersControl does not pass map props to children (#142) * v0.11.1 * v0.11.2 * Add dynamic draggable props to Marker (#148) * expose ability to toggle marker's draggable status * fix indentation * v0.11.3
* Set source argument in Popup creation * v0.10.1 * Animate panning and zooming * v0.10.2 * Lint 'object destructuring filter' consistently The pattern ```const { map, url, ...props } = this.props``` usually failed during linting, because the ```map``` variable is defined but not used. After adding the ```"varsIgnorePattern": "^_"``` option to the ```no-unused-vars``` rule, unused properies can be marked as: ```const { map: _, url, ...props } = this.props```. I also updated the eslint and babel-eslint dependencies, because of some relevant bugfixes. * Add babel-plugin-lodash * Introduce the concept of 'layer container', as a unified interface for L.Map and L.LayerGroup. * v0.11 - new LayersControl * Component-based LayersControl * Deprecate `onLeaflet...` format for events * React v15 * LayersControl does not pass map props to children (#142) * v0.11.1 * v0.11.2 * Add dynamic draggable props to Marker (#148) * expose ability to toggle marker's draggable status * fix indentation * v0.11.3 * Changes removeFrom to remove in MapControl * Removes MultiPolyline; multipolylines are now supported by Polyline * Removes MultiPolygon; multipolygons are now supported by Polygon * Removes CanvasTileLayer, which has been removed from leaflet * Updates Circle instantiator to use new format
# Conflicts: # .babelrc # .eslintrc.json # CHANGELOG.md # README.md # __tests__/LayersControl.js # __tests__/MapComponent.js # __tests__/MapLayer.js # __tests__/Marker.js # bower.json # dist/react-leaflet.js # dist/react-leaflet.min.js # example/components/animate.js # example/components/custom-component.js # example/components/draggable-marker.js # example/components/index.js # example/components/layers-control.js # lib/AttributionControl.js # lib/CanvasTileLayer.js # lib/Circle.js # lib/CircleMarker.js # lib/FeatureGroup.js # lib/GeoJson.js # lib/ImageOverlay.js # lib/LayerGroup.js # lib/LayersControl.js # lib/Map.js # lib/MapComponent.js # lib/MapControl.js # lib/MapLayer.js # lib/Marker.js # lib/MultiPolygon.js # lib/MultiPolyline.js # lib/Path.js # lib/Polygon.js # lib/Polyline.js # lib/Popup.js # lib/Rectangle.js # lib/ScaleControl.js # lib/TileLayer.js # lib/WMSTileLayer.js # lib/ZoomControl.js # lib/types/index.js # package.json # src/CanvasTileLayer.js # src/Circle.js # src/CircleMarker.js # src/FeatureGroup.js # src/GeoJson.js # src/ImageOverlay.js # src/LayerGroup.js # src/LayersControl.js # src/Map.js # src/MapComponent.js # src/MapControl.js # src/MapLayer.js # src/Marker.js # src/MultiPolygon.js # src/MultiPolyline.js # src/Path.js # src/Polygon.js # src/Polyline.js # src/Popup.js # src/Rectangle.js # src/TileLayer.js # src/WMSTileLayer.js # src/index.js # src/types/children.js # src/types/index.js # src/types/layerContainer.js
# Conflicts: # CHANGELOG.md # dist/react-leaflet.min.js # package.json
* add useFlyTo, flyToBounds, and flyTo * fix tests, use uniqueId from lodash * deconstruct in alphabetical order * add documentation for flyTo * set default value for useFlyTo * remove custom id generator.
Closed
# Conflicts: # CHANGELOG.md # __tests__/Map.js # __tests__/Marker.js # __tests__/Popup.js # bower.json # dist/react-leaflet.js # dist/react-leaflet.min.js # lib/CanvasTileLayer.js # lib/GeoJson.js # lib/GridLayer.js # lib/Map.js # lib/MultiPolygon.js # lib/MultiPolyline.js # lib/Popup.js # lib/ScaleControl.js # package.json # src/MultiPolygon.js
* MapPane implements Leaflet panes. * Added MapPane to index.js * Helper function 'getInstanceOptions' to pass options + possible pane from context. * Implemented possible pane context into appropriate items. * Added MapPane to docs and examples. * Added to docs/API * Typo fix * Typo fix * Initial commit for MapPane component. * Allow overriding pane name through props. * Allow nested panes. * Renamed 'MapPane' to 'Pane' * Renamed 'getInstanceOptions' to 'getOptions' * Renamed MapPane.js to Pane.js * Removed paneType * Renamed MapPane to Pane in documentation and examples. * Removed _isMounted, Moved this._name to this.state.name * Bugfix missing 'PropTypes' * componentWillMount moved to componentDidMount * Removed paneType export from types/index * Added Pane export in index to alphabetical order. * Updated docs and example. * Comments, className, removed zIndex. * Updated pane docs and example. * Removed deprecated lines in createPane. * Disallow default pane names. * Updated docs * Removed 'cloneElement' for children, Bugfix removing pane.
# Conflicts: # dist/react-leaflet.js # dist/react-leaflet.min.js # lib/CanvasTileLayer.js # lib/Circle.js # lib/CircleMarker.js # lib/FeatureGroup.js # lib/GeoJSON.js # lib/GridLayer.js # lib/ImageOverlay.js # lib/LayerGroup.js # lib/LayersControl.js # lib/Map.js # lib/MapComponent.js # lib/MapControl.js # lib/Marker.js # lib/MultiPolygon.js # lib/MultiPolyline.js # lib/Path.js # lib/Polygon.js # lib/Polyline.js # lib/Popup.js # lib/Rectangle.js # lib/TileLayer.js # lib/WMSTileLayer.js # lib/index.js # package.json
<3 |
sunny-g
reviewed
Nov 3, 2016
@@ -15,4 +16,10 @@ export default class WMSTileLayer extends GridLayer { | |||
const { url, ...props } = this.props | |||
this.leafletElement = tileLayer.wms(url, this.getOptions(props)) | |||
} | |||
|
|||
componentDidUpdate (prevProps: Object) { | |||
if (!isEqual(this.props, prevProps)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulLeCam Would it possible to make the url
prop dynamic as well, something like before this conditional:
if (!isEqual(this.props.url, prevProps.url)) {
this.leafletElement.setUrl(this.props.url); // potentially noRedraw set to true to reduce over-redraws
}
This could make it significantly easier to hide/show the layers without having to resort to the imperative Leaflet API for adding/removing layers.
5 tasks
* Update `eslint-plugin-promise` dependency * reduce flow errors to 0 * update with next
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Future release of React-Leaflet.
Not ready to be merged yet, only used to track changes.