From 2100788d0253d2c0eeb18287845a2189d378f259 Mon Sep 17 00:00:00 2001 From: Venelin Iliev Date: Tue, 26 Apr 2016 14:55:35 +0300 Subject: [PATCH 1/2] Modification for dynamic set of vsGoogleAutocomplete Options --- src/vs-google-autocomplete.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vs-google-autocomplete.js b/src/vs-google-autocomplete.js index 2032b88..aec5cd7 100644 --- a/src/vs-google-autocomplete.js +++ b/src/vs-google-autocomplete.js @@ -173,6 +173,15 @@ angular.module('vsGoogleAutocomplete').directive('vsGoogleAutocomplete', ['vsGoo var autocompleteOptions = scope.vsGoogleAutocomplete || {}, autocomplete = new google.maps.places.Autocomplete(element[0], autocompleteOptions); + /* + ProVision.bg - Modification for dynamic set of vsGoogleAutocomplete Options + @author: Venelin Iliev + */ + scope.$watch('vsGoogleAutocomplete', function () { + autocomplete.setComponentRestrictions(scope.vsGoogleAutocomplete.componentRestrictions || {}); + autocomplete.setTypes(scope.vsGoogleAutocomplete.types || {}); + }); + // google place object var place; From f98525c86b808865272d38e592b427da40fe19b8 Mon Sep 17 00:00:00 2001 From: Venelin Iliev Date: Tue, 26 Apr 2016 14:58:13 +0300 Subject: [PATCH 2/2] Modification for dynamic set of vsGoogleAutocomplete Options --- dist/vs-google-autocomplete.js | 13 +++++++++++-- dist/vs-google-autocomplete.min.js | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dist/vs-google-autocomplete.js b/dist/vs-google-autocomplete.js index d026bd8..0709a3b 100644 --- a/dist/vs-google-autocomplete.js +++ b/dist/vs-google-autocomplete.js @@ -1,7 +1,7 @@ /** - * vsGoogleAutocomplete - v0.5.0 - 2015-11-29 + * vsGoogleAutocomplete - v0.5.0 - 2016-04-26 * https://github.com/vskosp/vsGoogleAutocomplete - * Copyright (c) 2015 K.Polishchuk + * Copyright (c) 2016 K.Polishchuk * License: MIT */ (function (window, document) { @@ -181,6 +181,15 @@ angular.module('vsGoogleAutocomplete').directive('vsGoogleAutocomplete', ['vsGoo var autocompleteOptions = scope.vsGoogleAutocomplete || {}, autocomplete = new google.maps.places.Autocomplete(element[0], autocompleteOptions); + /* + ProVision.bg - Modification for dynamic set of vsGoogleAutocomplete Options + @author: Venelin Iliev + */ + scope.$watch('vsGoogleAutocomplete', function () { + autocomplete.setComponentRestrictions(scope.vsGoogleAutocomplete.componentRestrictions || {}); + autocomplete.setTypes(scope.vsGoogleAutocomplete.types || {}); + }); + // google place object var place; diff --git a/dist/vs-google-autocomplete.min.js b/dist/vs-google-autocomplete.min.js index f5c06ed..1c29c97 100644 --- a/dist/vs-google-autocomplete.min.js +++ b/dist/vs-google-autocomplete.min.js @@ -1 +1 @@ -!function(a,b){"use strict";angular.module("vsGoogleAutocomplete",[]),angular.module("vsGoogleAutocomplete").factory("vsGooglePlaceUtility",function(){function a(a){return a?!!a.place_id:!1}function b(b,c){var d,e,f;if(!a(b))return!1;d=b.types;for(var g=0;g