1- /*! angular-google-maps 2.3.0 2016-01-23
1+ /*! angular-google-maps 2.3.0 2016-01-24
22 * AngularJS directives for Google Maps
33 * git: https://github.com/angular-ui/angular-google-maps.git
44 */
@@ -1053,7 +1053,10 @@ Nicholas McCready - https://twitter.com/nmccready
10531053 ]);
10541054
10551055}).call(this);
1056- ;(function() {
1056+ ;
1057+ /*global _:true, angular:true, google:true */
1058+
1059+ (function() {
10571060 angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapGmapUtil', [
10581061 'uiGmapLogger', '$compile', function(Logger, $compile) {
10591062 var _isFalse, _isTruthy, getCoords, getLatitude, getLongitude, validateCoords;
@@ -1440,8 +1443,11 @@ Nicholas McCready - https://twitter.com/nmccready
14401443 return (function(superClass) {
14411444 extend(_Class, superClass);
14421445
1443- function _Class(scope1) {
1446+ function _Class(scope1, _interface ) {
14441447 this.scope = scope1;
1448+ this["interface"] = _interface != null ? _interface : {
1449+ scopeKeys: []
1450+ };
14451451 this.modelsLength = bind(this.modelsLength, this);
14461452 this.updateChild = bind(this.updateChild, this);
14471453 this.destroy = bind(this.destroy, this);
@@ -1451,8 +1457,6 @@ Nicholas McCready - https://twitter.com/nmccready
14511457 this.setIdKey = bind(this.setIdKey, this);
14521458 this.modelKeyComparison = bind(this.modelKeyComparison, this);
14531459 _Class.__super__.constructor.call(this);
1454- this["interface"] = {};
1455- this["interface"].scopeKeys = [];
14561460 this.defaultIdKey = 'id';
14571461 this.idKey = void 0;
14581462 }
@@ -1472,16 +1476,21 @@ Nicholas McCready - https://twitter.com/nmccready
14721476 };
14731477
14741478 _Class.prototype.modelKeyComparison = function(model1, model2) {
1475- var hasCoords, isEqual, ref , scope, without;
1476- hasCoords = (ref = this["interface"].scopeKeys) != null ? ref.hasOwnProperty ('coords') : void 0;
1479+ var coord1, coord2, hasCoords, isEqual , scope, without;
1480+ hasCoords = this["interface"].scopeKeys.indexOf ('coords') >= 0;
14771481 if (hasCoords && (this.scope.coords != null) || !hasCoords) {
14781482 scope = this.scope;
14791483 }
14801484 if (scope == null) {
14811485 throw 'No scope set!';
14821486 }
14831487 if (hasCoords) {
1484- isEqual = GmapUtil.equalCoords(this.scopeOrModelVal('coords', scope, model1), this.scopeOrModelVal('coords', scope, model2));
1488+ console.log('hasCoords');
1489+ coord1 = this.scopeOrModelVal('coords', scope, model1);
1490+ coord2 = this.scopeOrModelVal('coords', scope, model2);
1491+ console.log("coord1:" + JSON.stringify(coord1));
1492+ console.log("coord2:" + JSON.stringify(coord2));
1493+ isEqual = GmapUtil.equalCoords(coord1, coord2);
14851494 if (!isEqual) {
14861495 return isEqual;
14871496 }
0 commit comments