@the-grid/ed-location
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -42,6 +42,10 @@ document.addEventListener('DOMContentLoaded', function () { | ||
var addressEl = addressControl.getContainer() | ||
if (!addressEl) return | ||
addressEl.querySelector('.ed-address-control-text').textContent = address | ||
} | ||
function setInputValue (text) { | ||
var geocoderEl = geocoderControl.getContainer() | ||
geocoderEl.querySelector('input').value = text | ||
} | ||
var addressVisible = true | ||
@@ -61,3 +65,5 @@ function toggleAddress () { | ||
var geocoderEl = geocoderControl.getContainer() | ||
geocoderEl.querySelector('input').select() | ||
var inputEl = geocoderEl.querySelector('input') | ||
inputEl.focus() | ||
inputEl.select() | ||
} | ||
@@ -86,2 +92,4 @@ | ||
.addEventListener('dragend', function (event) { | ||
var loc = marker.getLatLng() | ||
map.setView(loc) | ||
locationToEd() | ||
@@ -121,2 +129,3 @@ }) | ||
setAddressText(block.metadata.address) | ||
setInputValue(block.metadata.address) | ||
} | ||
@@ -123,0 +132,0 @@ } |
{ | ||
"name": "@the-grid/ed-location", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Ed widget for address geocoding and map location editing", | ||
@@ -5,0 +5,0 @@ "main": "ed-location.js", |
# ed-location | ||
Ed widget for address geocoding and map location editing | ||
[Ed](https://github.com/the-grid/ed) widget for address geocoding and map location editing |
Sorry, the diff of this file is not supported yet
8625
137