@@ -359,6 +359,12 @@ Nicholas McCready - https://twitter.com/nmccready
359359 }, {
360360 missingName: 'some',
361361 swapName: 'any'
362+ }, {
363+ missingName: 'first',
364+ swapName: 'head'
365+ }, {
366+ missingName: 'head',
367+ swapName: 'first'
362368 }
363369 ].forEach(function(toMonkeyPatch) {
364370 return fixLodash(toMonkeyPatch);
@@ -577,7 +583,10 @@ Nicholas McCready - https://twitter.com/nmccready
577583 });
578584
579585}).call(this);
580- ;(function() {
586+ ;
587+ /*global _:true,angular:true, */
588+
589+ (function() {
581590 angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmap_sync', [
582591 function() {
583592 return {
@@ -597,7 +606,7 @@ Nicholas McCready - https://twitter.com/nmccready
597606 }
598607 ]).service('uiGmap_async', [
599608 '$timeout', 'uiGmapPromise', 'uiGmapLogger', '$q', 'uiGmapDataStructures', 'uiGmapGmapUtil', function($timeout, uiGmapPromise, $log, $q, uiGmapDataStructures, uiGmapGmapUtil) {
600- var ExposedPromise, PromiseQueueManager, SniffedPromise, _getArrayAndKeys, _getIterateeValue, _ignoreFields, defaultChunkSize, doChunk, doSkippPromise, each, errorObject, isInProgress, kickPromise, logTryCatch, managePromiseQueue, map, maybeCancelPromises, promiseStatus, promiseTypes, tryCatch;
609+ var ExposedPromise, PromiseQueueManager, SniffedPromise, _getIterateeValue, _ignoreFields, defaultChunkSize, doChunk, doSkippPromise, each, errorObject, getArrayAndKeys , isInProgress, kickPromise, logTryCatch, managePromiseQueue, map, maybeCancelPromises, promiseStatus, promiseTypes, tryCatch;
601610 promiseTypes = uiGmapPromise.promiseTypes;
602611 isInProgress = uiGmapPromise.isInProgress;
603612 promiseStatus = uiGmapPromise.promiseStatus;
@@ -748,7 +757,7 @@ Nicholas McCready - https://twitter.com/nmccready
748757 return collection[valOrKey];
749758 };
750759 _ignoreFields = ['length', 'forEach', 'map'];
751- _getArrayAndKeys = function(collection, keys, bailOutCb, cb) {
760+ getArrayAndKeys = function(collection, keys, bailOutCb, cb) {
752761 var array, propName, val;
753762 if (angular.isArray(collection)) {
754763 array = collection;
@@ -760,15 +769,15 @@ Nicholas McCready - https://twitter.com/nmccready
760769 for (propName in collection) {
761770 val = collection[propName];
762771 if (collection.hasOwnProperty(propName) && !_.includes(_ignoreFields, propName)) {
763- array.push(val );
772+ array.push(propName );
764773 }
765774 }
766775 }
767776 }
768777 if (cb == null) {
769778 cb = bailOutCb;
770779 }
771- if (angular.isArray(array) && (array === void 0 || (array != null ? array.length : void 0) <= 0)) {
780+ if (angular.isArray(array) && ! (array != null ? array.length : void 0)) {
772781 if (cb !== bailOutCb) {
773782 return bailOutCb();
774783 }
@@ -787,7 +796,7 @@ Nicholas McCready - https://twitter.com/nmccready
787796 Optional Asynchronous Chunking via promises.
788797 */
789798 doChunk = function(collection, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index, _keys) {
790- return _getArrayAndKeys (collection, _keys, function(array, keys) {
799+ return getArrayAndKeys (collection, _keys, function(array, keys) {
791800 var cnt, i, keepGoing, val;
792801 if (chunkSizeOrDontChunk && chunkSizeOrDontChunk < array.length) {
793802 cnt = chunkSizeOrDontChunk;
@@ -838,7 +847,7 @@ Nicholas McCready - https://twitter.com/nmccready
838847 overallD.reject(error);
839848 return ret;
840849 }
841- return _getArrayAndKeys (collection, _keys, function() {
850+ return getArrayAndKeys (collection, _keys, function() {
842851 overallD.resolve();
843852 return ret;
844853 }, function(array, keys) {
@@ -849,7 +858,7 @@ Nicholas McCready - https://twitter.com/nmccready
849858 map = function(collection, iterator, chunkSizeOrDontChunk, pauseCb, index, pauseMilli, _keys) {
850859 var results;
851860 results = [];
852- return _getArrayAndKeys (collection, _keys, function() {
861+ return getArrayAndKeys (collection, _keys, function() {
853862 return uiGmapPromise.resolve(results);
854863 }, function(array, keys) {
855864 return each(collection, function(o) {
@@ -865,6 +874,7 @@ Nicholas McCready - https://twitter.com/nmccready
865874 managePromiseQueue: managePromiseQueue,
866875 promiseLock: managePromiseQueue,
867876 defaultChunkSize: defaultChunkSize,
877+ getArrayAndKeys: getArrayAndKeys,
868878 chunkSizeFrom: function(fromSize, ret) {
869879 if (ret == null) {
870880 ret = void 0;
@@ -1485,11 +1495,8 @@ Nicholas McCready - https://twitter.com/nmccready
14851495 throw 'No scope set!';
14861496 }
14871497 if (hasCoords) {
1488- console.log('hasCoords');
14891498 coord1 = this.scopeOrModelVal('coords', scope, model1);
14901499 coord2 = this.scopeOrModelVal('coords', scope, model2);
1491- console.log("coord1:" + JSON.stringify(coord1));
1492- console.log("coord2:" + JSON.stringify(coord2));
14931500 isEqual = GmapUtil.equalCoords(coord1, coord2);
14941501 if (!isEqual) {
14951502 return isEqual;
@@ -4898,7 +4905,10 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
48984905 ]);
48994906
49004907}).call(this);
4901- ;(function() {
4908+ ;
4909+ /*global _:true,angular:true, */
4910+
4911+ (function() {
49024912 var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
49034913 extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
49044914 hasProp = {}.hasOwnProperty;
@@ -4929,10 +4939,8 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
49294939 this.createChildScopes = bind(this.createChildScopes, this);
49304940 this.validateScope = bind(this.validateScope, this);
49314941 this.onWatch = bind(this.onWatch, this);
4932- var self;
49334942 MarkersParentModel.__super__.constructor.call(this, scope, element, attrs, map);
49344943 this["interface"] = IMarker;
4935- self = this;
49364944 _setPlurals(new PropMap(), this);
49374945 this.scope.pluralsUpdate = {
49384946 updateCtr: 0
@@ -5034,13 +5042,11 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
50345042 angular.extend(typeEvents, this.origTypeEvents);
50355043 }
50365044 internalHandles = {};
5037- _.each(events, (function(_this) {
5038- return function(eventName) {
5039- return internalHandles[eventName] = function(group) {
5040- return self.maybeExecMappedEvent(group, eventName);
5041- };
5045+ _.each(events, function(eventName) {
5046+ return internalHandles[eventName] = function(group) {
5047+ return self.maybeExecMappedEvent(group, eventName);
50425048 };
5043- })(this)) ;
5049+ });
50445050 return angular.extend(typeEvents, internalHandles);
50455051 };
50465052
@@ -5164,7 +5170,10 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
51645170 };
51655171
51665172 MarkersParentModel.prototype.newChildMarker = function(model, scope) {
5167- var child, childScope, doDrawSelf, keys;
5173+ var child, childScope, keys;
5174+ if (!model) {
5175+ throw 'model undefined';
5176+ }
51685177 if (model[this.idKey] == null) {
51695178 this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key.");
51705179 return;
@@ -5176,7 +5185,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
51765185 IMarker.scopeKeys.forEach(function(k) {
51775186 return keys[k] = scope[k];
51785187 });
5179- child = new MarkerChildModel(childScope, model, keys, this.map, this.DEFAULTS, this.doClick, this.gManager, doDrawSelf = false);
5188+ child = new MarkerChildModel(childScope, model, keys, this.map, this.DEFAULTS, this.doClick, this.gManager, false);
51805189 this.scope.plurals.put(model[this.idKey], child);
51815190 return child;
51825191 };
0 commit comments