Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions dist/locationpicker.jquery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! jquery-locationpicker - v0.1.12 - 2015-01-05 */
/*! jquery-locationpicker - v0.1.13 - 2015-05-03 */
(function($) {
function GMapContext(domElement, options) {
var _map = new google.maps.Map(domElement, options);
Expand Down Expand Up @@ -117,23 +117,23 @@
if (!inputBinding) return;
var currentLocation = GmUtility.locationFromLatLng(gmapContext.location);
if (inputBinding.latitudeInput) {
inputBinding.latitudeInput.val(currentLocation.latitude).change();
inputBinding.latitudeInput.val(currentLocation.latitude).trigger("change", true);
}
if (inputBinding.longitudeInput) {
inputBinding.longitudeInput.val(currentLocation.longitude).change();
inputBinding.longitudeInput.val(currentLocation.longitude).trigger("change", true);
}
if (inputBinding.radiusInput) {
inputBinding.radiusInput.val(gmapContext.radius).change();
inputBinding.radiusInput.val(gmapContext.radius).trigger("change", true);
}
if (inputBinding.locationNameInput) {
inputBinding.locationNameInput.val(gmapContext.locationName).change();
inputBinding.locationNameInput.val(gmapContext.locationName).trigger("change", true);
}
}
function setupInputListenersInput(inputBinding, gmapContext) {
if (inputBinding) {
if (inputBinding.radiusInput) {
inputBinding.radiusInput.on("change", function(e) {
if (!e.originalEvent) {
inputBinding.radiusInput.on("change", function(e, isInternal) {
if (isInternal) {
return;
}
gmapContext.radius = $(this).val();
Expand All @@ -157,22 +157,24 @@
});
}
if (inputBinding.latitudeInput) {
inputBinding.latitudeInput.on("change", function(e) {
if (!e.originalEvent) {
inputBinding.latitudeInput.on("change", function(e, isInternal) {
if (isInternal) {
return;
}
GmUtility.setPosition(gmapContext, new google.maps.LatLng($(this).val(), gmapContext.location.lng()), function(context) {
context.settings.onchanged.apply(gmapContext.domContainer, [ GmUtility.locationFromLatLng(context.location), context.radius, false ]);
updateInputValues(inputBinding, gmapContext);
});
});
}
if (inputBinding.longitudeInput) {
inputBinding.longitudeInput.on("change", function(e) {
if (!e.originalEvent) {
inputBinding.longitudeInput.on("change", function(e, isInternal) {
if (isInternal) {
return;
}
GmUtility.setPosition(gmapContext, new google.maps.LatLng(gmapContext.location.lat(), $(this).val()), function(context) {
context.settings.onchanged.apply(gmapContext.domContainer, [ GmUtility.locationFromLatLng(context.location), context.radius, false ]);
updateInputValues(inputBinding, gmapContext);
});
});
}
Expand Down Expand Up @@ -294,4 +296,4 @@
onlocationnotfound: function(locationName) {},
oninitialized: function(component) {}
};
})(jQuery);
})(jQuery);
6 changes: 3 additions & 3 deletions dist/locationpicker.jquery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading