Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-google-maps

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-google-maps - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 1.7.0 (2015-06-19)
#### Features
* **GoogleMaps:** specify map bounds via declarative props.bounds ([b1333c52](https://github.com/tomchentw/react-google-maps/commit/b1333c529fc4b338cef425dba9b4ba7d33937d29), closes [#64](https://github.com/tomchentw/react-google-maps/issues/64))
## 1.6.0 (2015-06-19)

@@ -2,0 +10,0 @@

16

lib/GoogleMaps.js

@@ -117,4 +117,5 @@ "use strict";

var googleMapsApi = props.googleMapsApi;
var bounds = props.bounds;
var googleMapsConfig = _objectWithoutProperties(props, ["containerProps", "googleMapsApi"]);
var googleMapsConfig = _objectWithoutProperties(props, ["containerProps", "googleMapsApi", "bounds"]);

@@ -124,2 +125,7 @@ /*eslint-enable no-unused-vars */

if (bounds) {
delete googleMapsConfig.zoom;
delete googleMapsConfig.center;
}
if (instance) {

@@ -134,2 +140,7 @@ instance.setOptions(googleMapsConfig);

}
if (bounds) {
instance.fitBounds(bounds);
}
return instance;

@@ -173,3 +184,4 @@ }

GoogleMaps.propTypes = _extends({}, _internalsEventComponent2["default"].propTypes, {
containerProps: PropTypes.object.isRequired
containerProps: PropTypes.object.isRequired,
bounds: _react2["default"].PropTypes.object
});

@@ -176,0 +188,0 @@

2

package.json
{
"__template__gist__": "https://gist.github.com/tomchentw/368a93bb748ad9d576f1#file-package-json",
"name": "react-google-maps",
"version": "1.6.0",
"version": "1.7.0",
"description": "React.js Google Maps integration component",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -58,6 +58,11 @@ import React from "react";

/*eslint-disable no-unused-vars */
const {containerProps, googleMapsApi, ...googleMapsConfig} = props;
const {containerProps, googleMapsApi, bounds, ...googleMapsConfig} = props;
/*eslint-enable no-unused-vars */
var {instance} = this.state;
if (bounds) {
delete googleMapsConfig.zoom;
delete googleMapsConfig.center;
}
if (instance) {

@@ -75,2 +80,7 @@ instance.setOptions(googleMapsConfig);

}
if (bounds) {
instance.fitBounds(bounds);
}
return instance;

@@ -110,2 +120,3 @@ }

containerProps: PropTypes.object.isRequired,
bounds: React.PropTypes.object
};

@@ -112,0 +123,0 @@

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