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

Commit 8455fd8

Browse files
committed
taking into account show, when updating layer options
Where updating layer options, we only want to set the map when show is set to true.
1 parent fa5fd8e commit 8455fd8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dist/angular-google-maps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4547,7 +4547,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
45474547
})(this), true);
45484548
this.scope.$watch('options', (function(_this) {
45494549
return function(newValue, oldValue) {
4550-
if (newValue !== oldValue) {
4550+
if (newValue !== oldValue && _this.doShow) {
45514551
return _this.gObject.setOptions(newValue);
45524552
}
45534553
};
@@ -4566,7 +4566,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
45664566
} else {
45674567
this.gObject = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type](this.scope.options) : new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options);
45684568
}
4569-
if (this.gObject != null) {
4569+
if ((this.gObject != null) && this.doShow) {
45704570
this.gObject.setMap(this.gMap);
45714571
}
45724572
if ((this.gObject != null) && (this.onLayerCreated != null)) {

0 commit comments

Comments
 (0)