Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Commit 287358d

Browse files
committed
fixes(1674): appends autocomplete on state change
appends autocomplete on state change if it does not exist already closes(1674)
1 parent 4aa4994 commit 287358d

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

dist/angular-google-maps.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-google-maps 2.2.1 2015-12-14
1+
/*! angular-google-maps 2.2.1 2016-01-08
22
* AngularJS directives for Google Maps
33
* git: https://github.com/angular-ui/angular-google-maps.git
44
*/
@@ -5471,6 +5471,13 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
54715471
}
54725472
this.listeners = this.setEvents(this.gObject, this.scope, this.scope);
54735473
this.$log.info(this);
5474+
this.scope.$on('$stateChangeSuccess', (function(_this) {
5475+
return function() {
5476+
if (_this.attrs.parentdiv != null) {
5477+
return _this.addToParentDiv();
5478+
}
5479+
};
5480+
})(this));
54745481
return this.scope.$on('$destroy', (function(_this) {
54755482
return function() {
54765483
return _this.gObject = null;
@@ -5483,8 +5490,11 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
54835490
};
54845491

54855492
SearchBoxParentModel.prototype.addToParentDiv = function() {
5493+
var ref;
54865494
this.parentDiv = angular.element(document.getElementById(this.scope.parentdiv));
5487-
return this.parentDiv.append(this.input);
5495+
if (((ref = this.parentDiv[0]) != null ? ref.firstChild : void 0) == null) {
5496+
return this.parentDiv.append(this.input);
5497+
}
54885498
};
54895499

54905500
SearchBoxParentModel.prototype.createSearchBox = function() {

0 commit comments

Comments
 (0)