@the-control-group/maps
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -48,2 +48,17 @@ import React, { Component } from 'react'; | ||
} | ||
// adjust map if latitude or longitude changed | ||
if(prevProps.latitude !== this.props.latitude || prevProps.longitude !== this.props.longitude) { | ||
const bounds = [{lat: parseFloat(this.props.latitude), lng: parseFloat(this.props.longitude)}]; | ||
this.props.markers.forEach(m => { | ||
const lat = parseFloat(m.latitude), | ||
lng = parseFloat(m.longitude); | ||
bounds.push({lat, lng}); | ||
}); | ||
this.setState({ | ||
bounds | ||
}, this.adjustBounds); | ||
} | ||
} | ||
@@ -50,0 +65,0 @@ |
{ | ||
"name": "@the-control-group/maps", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Map kit based on ReactJS for TCG projects", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
18932
167