New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-leaflet

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-leaflet - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

flow-typed/npm/babel-cli_vx.x.x.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## v1.3.1 (2017-06-20)
Fixed Popup auto-panning.
## v1.3.0 (2017-06-11)

@@ -2,0 +6,0 @@

3

lib/Map.js

@@ -219,4 +219,3 @@ 'use strict';

_get(Map.prototype.__proto__ || Object.getPrototypeOf(Map.prototype), 'componentDidMount', this).call(this);
this.forceUpdate // Re-render now that leafletElement is created
();
this.forceUpdate(); // Re-render now that leafletElement is created
}

@@ -223,0 +222,0 @@ }, {

@@ -7,2 +7,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -82,2 +84,8 @@

_this.leafletElement.update();
if (_this.props.autoPan !== false) {
if (_this.leafletElement._map && _this.leafletElement._map._panAnim) {
_this.leafletElement._map._panAnim = undefined;
}
_this.leafletElement._adjustPan();
}
} else {

@@ -94,2 +102,11 @@ _this.removePopupContent();

_createClass(Popup, [{
key: 'getOptions',
value: function getOptions() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return _extends({}, _get(Popup.prototype.__proto__ || Object.getPrototypeOf(Popup.prototype), 'getOptions', this).call(this, props), {
autoPan: false
});
}
}, {
key: 'createLeafletElement',

@@ -114,2 +131,3 @@ value: function createLeafletElement(props) {

this.leafletElement = this.createLeafletElement(this.props);
this.leafletElement.options.autoPan = this.props.autoPan !== false;

@@ -116,0 +134,0 @@ this.context.map.on({

{
"name": "react-leaflet",
"version": "1.3.0",
"version": "1.3.1",
"description": "React components for Leaflet maps",

@@ -61,11 +61,11 @@ "main": "lib/index.js",

"babel-preset-stage-1": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-prettier": "^2.1.1",
"eslint": "^4.0.0",
"eslint-config-prettier": "^2.2.0",
"eslint-plugin-flowtype": "^2.33.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^5.0.0",
"eslint-plugin-prettier": "^2.1.1",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^7.0.1",
"flow-bin": "^0.47.0",
"eslint-plugin-react": "^7.1.0",
"flow-bin": "^0.48.0",
"jest-cli": "^20.0.3",

@@ -75,6 +75,6 @@ "leaflet": "^1.0.3",

"prettier": "^1.4.4",
"react": "^15.5.0",
"react-dom": "^15.5.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-transform-hmr": "^1.0.4",
"webpack": "^2.6.0",
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.5"

@@ -81,0 +81,0 @@ },

@@ -27,2 +27,9 @@ // @flow

getOptions(props: Object = {}): Object {
return {
...super.getOptions(props),
autoPan: false,
}
}
createLeafletElement(props: Object): Object {

@@ -42,2 +49,3 @@ const { children: _children, ...options } = props

this.leafletElement = this.createLeafletElement(this.props)
this.leafletElement.options.autoPan = this.props.autoPan !== false

@@ -112,2 +120,8 @@ this.context.map.on({

this.leafletElement.update()
if (this.props.autoPan !== false) {
if (this.leafletElement._map && this.leafletElement._map._panAnim) {
this.leafletElement._map._panAnim = undefined
}
this.leafletElement._adjustPan()
}
} else {

@@ -114,0 +128,0 @@ this.removePopupContent()

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc