google-react-maps
Advanced tools
Comparing version 1.2.23 to 1.2.24
@@ -29,8 +29,5 @@ 'use strict'; | ||
var _mounted = false; | ||
//Rational: This component emulates the google Data.Feature. | ||
//It lives in the context of a <DataLayer /> Component and interfaces with it's Data object that has been passed as prop to it. | ||
/** The component that handles individual features within a data layer. */ | ||
var Feature = function (_React$Component) { | ||
@@ -71,3 +68,3 @@ _inherits(Feature, _React$Component); | ||
_this.updateProperties = _this.updateProperties.bind(_this); | ||
_this.mounted = false; | ||
return _this; | ||
@@ -98,3 +95,3 @@ } | ||
feature.setGeometry(newGeometry); | ||
if (_mounted) { | ||
if (this.mounted) { | ||
this.setState({ selected_point: { index: point.index + 1, latLng: latLng } }); | ||
@@ -140,3 +137,3 @@ } | ||
var foundPoint = this.findPoint(latLng); | ||
if (foundPoint && _mounted) { | ||
if (foundPoint && this.mounted) { | ||
this.setState({ selected_point: foundPoint }); | ||
@@ -198,3 +195,3 @@ } | ||
feature.toGeoJson(function (geoJson) { | ||
if (_mounted) { | ||
if (_this2.mounted) { | ||
_this2.setState({ geoJson: JSON.parse(JSON.stringify(geoJson)) }, function () { | ||
@@ -313,3 +310,3 @@ if (typeof _this2.props.onChange === 'function') _this2.props.onChange(geoJson); | ||
// console.log("F: componentDidMount") | ||
_mounted = true; | ||
this.mounted = true; | ||
if (this.props.data) { | ||
@@ -344,3 +341,3 @@ var id = undefined; | ||
value: function componentWillUnmount() { | ||
_mounted = false; | ||
this.mounted = false; | ||
if (this.props.data) this.props.data.remove(this.state.feature); | ||
@@ -347,0 +344,0 @@ |
{ | ||
"name": "google-react-maps", | ||
"version": "1.2.23", | ||
"version": "1.2.24", | ||
"description": "A more powerfully custom version of the Google Maps Javascript API built for React. Multiple Datalayer support. GEOJSON Enabled.", | ||
@@ -5,0 +5,0 @@ "main": "dist/components/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4632290