diff --git a/.flowconfig b/.flowconfig index 75f7b085..b0a82fc5 100644 --- a/.flowconfig +++ b/.flowconfig @@ -1,6 +1,7 @@ [ignore] [include] +./node_modules/react [libs] diff --git a/CHANGELOG.md b/CHANGELOG.md index e911d611..957e6236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,13 @@ -## v1.0 (dev) +## v1.0.0-beta.1 (2016-07-30) -- [BREAKING] Renamed `GeoJson` to `GeoJSON` to match Leaflet change. +- [BREAKING] Renamed `GeoJson` to `GeoJSON` to match Leaflet's change. - [BREAKING] Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively. -- [BREAKING] Removed `CanvasTileLayer`, replaced by `GridLayer`. +- [BREAKING] Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer). - [BREAKING] Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0. - Removed `BaseTileLayer`, replaced by `GridLayer`. -- Removed support for React < v15.0.0. - Removed `bower.json` file. - The `Map` component no longer creates an unique ID for its container if none is provided. +- All components now extend from `React.PureComponent` instead of `React.Component`, as such React v15.3.0+ is now required. - Added `GridLayer`. - Added `useFlyTo: bool` property to `Map` to use `flyTo` instead of `setView` and `flyToBounds` instead of `fitBounds` when changing the map's view or bounds ([PR #148](https://github.com/PaulLeCam/react-leaflet/pull/192) by *jgimbel*). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0aee9678..1ddd3a11 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ However, please **do not** send pull requests to add features that are not suppo ## Features requests This library aims only to support the features provided by Leaflet. If any of these features is not implemented yet, please submit a feature request to add it. -If you are looking for implementations of features provided by plugins, they will not be provided by this library. Please read the [creating custom components](#creating-custom-components) section of the documentation to see how to implement plugins in your own code. +If you are looking for implementations of features provided by plugins, they will not be provided by this library. Please read the [extending](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/Extending.md) section of the documentation to see how to implement plugins in your own code. ## Other issues diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 5877b7b4..a5af1d38 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,15 +1,19 @@ Please make sure to check the following boxes before submitting an issue. Thanks! - [ ] Check that all peer dependencies are installed: React, ReactDOM and Leaflet. -- [ ] Check that you are using a supported version of React (v0.14 or v15). -- [ ] Check that you are using a supported version of Leaflet (v.0.7) +- [ ] Check that you are using a supported version of React and ReactDOM (v15.3.0+). +- [ ] Check that you are using the supported version of Leaflet (v.1.0.0-rc.2) and its corresponding CSS file is loaded. - [ ] 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://github.com/PaulLeCam/react-leaflet/blob/master/README.md) and that you understand the [technical considerations](https://github.com/PaulLeCam/react-leaflet/blob/master/README.md#technical-considerations). +- [ ] Make sure you have fully read the [documentation](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/README.md) and that you understand the [technical considerations](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/How%20it%20works.md#limitations). ### Expected behavior +Please describe. + ### Actual behavior +Please describe. + ### Steps to reproduce Please provide the simplest example possible to reproduce the issue, based on [this jsfiddle](https://jsfiddle.net/paul_lecam/q2v7t59h/). diff --git a/UPGRADING.md b/UPGRADING.md index 23641ba7..9231ad91 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -2,7 +2,7 @@ ## v1.0 (in progress) -TODO for v1 RC, keep track of changes in Leaflet and local commits / change log in the meantime. +TODO for v1 RC, keep track of changes in Leaflet and [local commits](https://github.com/PaulLeCam/react-leaflet/pull/196) / [changelog](CHANGELOG.md) in the meantime. ## v0.12.0 diff --git a/dist/react-leaflet.js b/dist/react-leaflet.js index 8356d1e6..9d3c1695 100644 --- a/dist/react-leaflet.js +++ b/dist/react-leaflet.js @@ -467,8 +467,8 @@ return /******/ (function(modules) { // webpackBootstrap function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - var MapControl = function (_Component) { - _inherits(MapControl, _Component); + var MapControl = function (_PureComponent) { + _inherits(MapControl, _PureComponent); function MapControl() { _classCallCheck(this, MapControl); @@ -501,7 +501,7 @@ return /******/ (function(modules) { // webpackBootstrap }]); return MapControl; - }(_react.Component); + }(_react.PureComponent); MapControl.propTypes = { position: _controlPosition2.default @@ -1406,6 +1406,7 @@ return /******/ (function(modules) { // webpackBootstrap } } stack['delete'](array); + stack['delete'](other); return result; } @@ -1684,6 +1685,7 @@ return /******/ (function(modules) { // webpackBootstrap } } stack['delete'](object); + stack['delete'](other); return result; } @@ -2097,8 +2099,8 @@ return /******/ (function(modules) { // webpackBootstrap var EVENTS_RE = /^on(.+)$/i; - var MapComponent = function (_Component) { - _inherits(MapComponent, _Component); + var MapComponent = function (_PureComponent) { + _inherits(MapComponent, _PureComponent); function MapComponent(props, context) { _classCallCheck(this, MapComponent); @@ -2183,7 +2185,7 @@ return /******/ (function(modules) { // webpackBootstrap }]); return MapComponent; - }(_react.Component); + }(_react.PureComponent); exports.default = MapComponent; @@ -2425,9 +2427,6 @@ return /******/ (function(modules) { // webpackBootstrap // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); - if (!isFull) { - stack['delete'](value); - } return result; } @@ -3446,8 +3445,8 @@ return /******/ (function(modules) { // webpackBootstrap // Abtract class for layer container, extended by BaseLayer and Overlay - var ControlledLayer = function (_Component) { - _inherits(ControlledLayer, _Component); + var ControlledLayer = function (_PureComponent) { + _inherits(ControlledLayer, _PureComponent); function ControlledLayer() { _classCallCheck(this, ControlledLayer); @@ -3500,7 +3499,7 @@ return /******/ (function(modules) { // webpackBootstrap }]); return ControlledLayer; - }(_react.Component); + }(_react.PureComponent); ControlledLayer.propTypes = controlledLayerPropTypes; ControlledLayer.contextTypes = { diff --git a/dist/react-leaflet.min.js b/dist/react-leaflet.min.js index 77d045df..46d78490 100644 --- a/dist/react-leaflet.min.js +++ b/dist/react-leaflet.min.js @@ -1,3 +1,3 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("leaflet"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["leaflet","react","react-dom"],t):"object"==typeof exports?exports.ReactLeaflet=t(require("leaflet"),require("react"),require("react-dom")):e.ReactLeaflet=t(e.L,e.React,e.ReactDOM)}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setIconDefaultImagePath=t.ZoomControl=t.WMSTileLayer=t.TileLayer=t.ScaleControl=t.Rectangle=t.Popup=t.Polyline=t.Polygon=t.Path=t.Marker=t.MapLayer=t.MapControl=t.MapComponent=t.Map=t.LayersControl=t.LayerGroup=t.ImageOverlay=t.GridLayer=t.GeoJSON=t.FeatureGroup=t.CircleMarker=t.Circle=t.AttributionControl=t.PropTypes=void 0;var i=n(1),u=o(i),a=n(2),l=r(a),p=n(11),c=o(p),f=n(13),s=o(f),y=n(75),d=o(y),h=n(76),v=o(h),b=n(77),O=o(b),m=n(79),j=o(m),P=n(80),g=o(P),_=n(81),w=o(_),x=n(82),T=o(x),E=n(83),M=o(E),k=n(53),C=o(k),L=n(12),R=o(L),W=n(52),S=o(W),D=n(101),U=o(D),I=n(14),A=o(I),F=n(102),q=o(F),B=n(103),z=o(B),N=n(104),G=o(N),Z=n(106),J=o(Z),V=n(107),$=o(V),H=n(108),K=o(H),Q=n(109),X=o(Q),Y=n(110),ee=o(Y);t.PropTypes=l,t.AttributionControl=c["default"],t.Circle=s["default"],t.CircleMarker=d["default"],t.FeatureGroup=v["default"],t.GeoJSON=O["default"],t.GridLayer=j["default"],t.ImageOverlay=g["default"],t.LayerGroup=w["default"],t.LayersControl=T["default"],t.Map=M["default"],t.MapComponent=C["default"],t.MapControl=R["default"],t.MapLayer=S["default"],t.Marker=U["default"],t.Path=A["default"],t.Polygon=q["default"],t.Polyline=z["default"],t.Popup=G["default"],t.Rectangle=J["default"],t.ScaleControl=$["default"],t.TileLayer=K["default"],t.WMSTileLayer=X["default"],t.ZoomControl=ee["default"];var te=t.setIconDefaultImagePath=function(e){u["default"].Icon.Default.imagePath=e};te("//cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0-rc.2/images")},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.layerContainer=t.latlngList=t.latlng=t.controlPosition=t.children=t.bounds=void 0;var o=n(3),i=r(o),u=n(7),a=r(u),l=n(8),p=r(l),c=n(6),f=r(c),s=n(5),y=r(s),d=n(9),h=r(d),v=n(10),b=r(v);t.bounds=i["default"],t.children=a["default"],t.controlPosition=p["default"],t.latlng=f["default"],t.latlngList=y["default"],t.layerContainer=h["default"],t.map=b["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=n(1),u=n(5),a=r(u);t["default"]=o.PropTypes.oneOfType([o.PropTypes.instanceOf(i.LatLngBounds),a["default"]])},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=n(6),u=r(i);t["default"]=o.PropTypes.arrayOf(u["default"])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t["default"]=r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.number),r.PropTypes.shape({lat:r.PropTypes.number,lng:r.PropTypes.number}),r.PropTypes.shape({lat:r.PropTypes.number,lon:r.PropTypes.number})])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t["default"]=r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.node),r.PropTypes.node])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t["default"]=r.PropTypes.oneOf(["topleft","topright","bottomleft","bottomright"])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);t["default"]=r.PropTypes.shape({addLayer:r.PropTypes.func.isRequired,removeLayer:r.PropTypes.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(4);t["default"]=o.PropTypes.instanceOf(r.Map)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n-1}var o=n(29);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}var o=n(29);e.exports=r},function(e,t,n){function r(e,t,n,r,l,p){var c=l&a,f=e.length,s=t.length;if(f!=s&&!(c&&s>f))return!1;var y=p.get(e);if(y&&p.get(t))return y==t;var d=-1,h=!0,v=l&u?new o:void 0;for(p.set(e,t),p.set(t,e);++d=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(78),p=r(l),c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function T(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:T(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},p=function(){function e(e,t){for(var n=0;n=c&&(s=p,y=!1,t=new o(t));e:for(;++f-1}var o=n(87);e.exports=r},function(e,t,n){function r(e,t,n){if(t!==t)return o(e,i,n);for(var r=n-1,u=e.length;++r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n-1}var o=n(29);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}var o=n(29);e.exports=r},function(e,t,n){function r(e,t,n,r,l,p){var c=l&a,f=e.length,s=t.length;if(f!=s&&!(c&&s>f))return!1;var y=p.get(e);if(y&&p.get(t))return y==t;var d=-1,h=!0,v=l&u?new o:void 0;for(p.set(e,t),p.set(t,e);++d=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(78),p=r(l),c=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function T(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:T(o,t,n)}if("value"in r)return r.value;var i=r.get;if(void 0!==i)return i.call(n)},p=function(){function e(e,t){for(var n=0;n=c&&(s=p,y=!1,t=new o(t));e:for(;++f-1}var o=n(87);e.exports=r},function(e,t,n){function r(e,t,n){if(t!==t)return o(e,i,n);for(var r=n-1,u=e.length;++r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n { +export default class MapComponent extends PureComponent { constructor (props: Object, context: Object) { super(props, context) this._leafletEvents = {} diff --git a/src/MapControl.js b/src/MapControl.js index 3f2df892..17effd0b 100644 --- a/src/MapControl.js +++ b/src/MapControl.js @@ -1,11 +1,11 @@ /* @flow */ -import { Component } from 'react' +import { PureComponent } from 'react' import controlPositionType from './types/controlPosition' import mapType from './types/map' -export default class MapControl extends Component { +export default class MapControl extends PureComponent { static propTypes = { position: controlPositionType, };