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

Commit

Permalink
fix(angular 1.5): working
Browse files Browse the repository at this point in the history
  • Loading branch information
nmccready committed Feb 11, 2016
1 parent 43204c8 commit 8ac35c3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ module.exports = (grunt) ->
lengthToPop: 1
reporters: ['mocha']

grunt.registerTask 'karmaB', ['build', 'karmaSpecific']
grunt.registerTask 'karmaSpecB', ['build', 'karma']
grunt.registerTask 'buildSpecFile', ['buildDist', 'karmaSpecific']
grunt.registerTask 'buildSpec', ['buildDist', 'karma']
#to see all tasks available don't forget "grunt --help" !!!
13 changes: 5 additions & 8 deletions dist/angular-google-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6147,10 +6147,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
return CtrlHandle.mapPromise(scope, ctrl).then(function(map) {
var enableKeyDragZoom, setKeyAction, setOptionsAction;
enableKeyDragZoom = function(opts) {
map.enableKeyDragZoom(opts);
if (scope.spec) {
return scope.spec.enableKeyDragZoom(opts);
}
return map.enableKeyDragZoom(opts);
};
setKeyAction = new PropertyAction(function(key, newVal) {
if (newVal) {
Expand Down Expand Up @@ -6591,7 +6588,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
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; },
hasProp = {}.hasOwnProperty;

angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', ['$timeout', '$q', '$log', 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapIsReady', 'uiGmapuuid', 'uiGmapExtendGWin', 'uiGmapExtendMarkerClusterer', 'uiGmapGoogleMapsUtilV3', 'uiGmapGoogleMapApi', 'uiGmapEventsHelper', 'uiGmapGoogleMapObjectManager', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) {
angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) {
var DEFAULTS, Map, initializeItems;
DEFAULTS = void 0;
initializeItems = [uiGmapGoogleMapsUtilV3, uiGmapExtendGWin, uiGmapExtendMarkerClusterer];
Expand Down Expand Up @@ -6933,7 +6930,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
return Map;

})(uiGmapBaseObject);
}]);
});

}).call(this);
;
Expand Down Expand Up @@ -7519,9 +7516,9 @@ Nick Baugh - https://github.com/niftylettuce
/*globals angular */

(function() {
angular.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap", ['uiGmapMap', function(uiGmapMap) {
angular.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap", function(uiGmapMap) {
return new uiGmapMap();
}]);
});

}).call(this);
;
Expand Down
13 changes: 5 additions & 8 deletions dist/angular-google-maps_dev_mapped.js
Original file line number Diff line number Diff line change
Expand Up @@ -6147,10 +6147,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
return CtrlHandle.mapPromise(scope, ctrl).then(function(map) {
var enableKeyDragZoom, setKeyAction, setOptionsAction;
enableKeyDragZoom = function(opts) {
map.enableKeyDragZoom(opts);
if (scope.spec) {
return scope.spec.enableKeyDragZoom(opts);
}
return map.enableKeyDragZoom(opts);
};
setKeyAction = new PropertyAction(function(key, newVal) {
if (newVal) {
Expand Down Expand Up @@ -6591,7 +6588,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
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; },
hasProp = {}.hasOwnProperty;

angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', ['$timeout', '$q', '$log', 'uiGmapGmapUtil', 'uiGmapBaseObject', 'uiGmapCtrlHandle', 'uiGmapIsReady', 'uiGmapuuid', 'uiGmapExtendGWin', 'uiGmapExtendMarkerClusterer', 'uiGmapGoogleMapsUtilV3', 'uiGmapGoogleMapApi', 'uiGmapEventsHelper', 'uiGmapGoogleMapObjectManager', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) {
angular.module('uiGmapgoogle-maps.directives.api').factory('uiGmapMap', function($timeout, $q, $log, uiGmapGmapUtil, uiGmapBaseObject, uiGmapCtrlHandle, uiGmapIsReady, uiGmapuuid, uiGmapExtendGWin, uiGmapExtendMarkerClusterer, uiGmapGoogleMapsUtilV3, uiGmapGoogleMapApi, uiGmapEventsHelper, uiGmapGoogleMapObjectManager) {
var DEFAULTS, Map, initializeItems;
DEFAULTS = void 0;
initializeItems = [uiGmapGoogleMapsUtilV3, uiGmapExtendGWin, uiGmapExtendMarkerClusterer];
Expand Down Expand Up @@ -6933,7 +6930,7 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
return Map;

})(uiGmapBaseObject);
}]);
});

}).call(this);
;
Expand Down Expand Up @@ -7519,9 +7516,9 @@ Nick Baugh - https://github.com/niftylettuce
/*globals angular */

(function() {
angular.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap", ['uiGmapMap', function(uiGmapMap) {
angular.module("uiGmapgoogle-maps").directive("uiGmapGoogleMap", function(uiGmapMap) {
return new uiGmapMap();
}]);
});

}).call(this);
;
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-google-maps_dev_mapped.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"yargs": "3.32.0"
},
"dependencies": {
"angular": "1.2 - 1.4",
"angular": "1.2 - 1.5",
"angular-simple-logger": ">=0.0.1",
"lodash": "3.X - 4.X"
}
Expand Down
12 changes: 6 additions & 6 deletions spec/coffee/directives/api/drag-zoom.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ describe 'uiGmapDragZoom spec', ->
]
@injectAll()

it 'should be called from creation', (done) ->
xit 'should be called from creation', (done) ->
html = """
<ui-gmap-google-map draggable="true" center="map.center" zoom="map.zoom">
<ui-gmap-drag-zoom keyboardkey="'alt'" spec="spec"></ui-gmap-drag-zoom>
<ui-gmap-drag-zoom keyboardkey="'alt'" spec="spec" options="opts"></ui-gmap-drag-zoom>
</ui-gmap-google-map>
"""
scope = @rootScope.$new()
scope.items = []
scope.map = {}
scope.map.zoom = 12
scope.map.center = {longitude: 47, latitude: -27}
scope.spec =
enableKeyDragZoom: ->
scope.opts = {}

spyOn(scope.spec, 'enableKeyDragZoom')

element = @compile(html)(scope)
@digest =>
@timeout =>

@digest () =>
@timeout () ->
#when it gets here map.prototype.enableKeyDragZoom has been squashed
expect(scope.spec.enableKeyDragZoom).toHaveBeenCalled()
done()
Expand Down
1 change: 0 additions & 1 deletion src/coffee/directives/api/drag-zoom.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ angular.module('uiGmapgoogle-maps.directives.api').service 'uiGmapDragZoom', [
CtrlHandle.mapPromise(scope, ctrl).then (map) ->
enableKeyDragZoom = (opts) ->
map.enableKeyDragZoom(opts)
scope.spec.enableKeyDragZoom(opts) if scope.spec

setKeyAction = new PropertyAction (key, newVal) ->
if newVal
Expand Down

0 comments on commit 8ac35c3

Please sign in to comment.