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

radius-widget

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

radius-widget - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "radius-widget",
"version": "1.1.0",
"version": "1.1.1",
"description": "Uses Google maps API to set location and radius",

@@ -5,0 +5,0 @@ "scripts": {

@@ -21,2 +21,3 @@ (function() {

radiusWidget.ignore = true;
radiusWidget.cityCircle.setCenter(centerPoint);

@@ -75,6 +76,6 @@ radiusWidget.container.querySelector('input[name=lat]').value = centerPoint.lat;

function showMap(radiusWidget) {
function showMap(radiusWidget, center, zoom) {
let mconfig = {
zoom: radiusWidget.config.initialZoom,
center: radiusWidget.config.initialCenter,
zoom: zoom || radiusWidget.config.initialZoom,
center: center || radiusWidget.config.initialCenter,
zoomControl: true,

@@ -91,3 +92,4 @@ mapTypeControl: false,

);
radiusWidget.map.panTo(radiusWidget.config.initialCenter);
// ToDo: remove panTo, because of map already initialized with initialCenter parameter in previous command
//radiusWidget.map.panTo(radiusWidget.config.initialCenter);
}

@@ -103,5 +105,5 @@

var centerPoint = {lat: results[0].geometry.location.lat(), lng :results[0].geometry.location.lng()};
var zoom = Math.max(3, Math.min(16, Math.ceil(radiusWidget.config.cityLevelZoom + 1/Math.log(2))));
var zoom = Math.max(3, Math.min(16, Math.ceil(radiusWidget.config.cityLevelZoom)));
if (radiusWidget.map == null) {
showMap(radiusWidget);
showMap(radiusWidget, centerPoint, zoom);
} else {

@@ -146,4 +148,4 @@ radiusWidget.map.setZoom(zoom);

google.maps.event.addListener(radiusWidget.cityCircle, "center_changed", function(){
if (this.ignore){
this.ignore = false;
if (radiusWidget.ignore){
radiusWidget.ignore = false;
return;

@@ -189,3 +191,3 @@ }

this.container.querySelector('div.rw-map-container').style.width = '100%';
this.container.querySelector('div.rw-form-container').style.visibility = 'hidden';
this.container.querySelector('div.rw-form-container').style.display = 'none';
}

@@ -192,0 +194,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