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

Commit 3318cb9

Browse files
committed
angular 1.2.2 is working
1 parent 596a041 commit 3318cb9

File tree

7 files changed

+15
-37
lines changed

7 files changed

+15
-37
lines changed

Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ module.exports = function (grunt) {
7777
dest: 'tmp/output.js'
7878
},
7979
example: {
80-
src: ['dist/angular-google-maps.js'],
81-
// src: ['dist/angular-google-maps.min.js'], //use min for release, otherwise other for testing
80+
// src: ['dist/angular-google-maps.js'],
81+
src: ['dist/angular-google-maps.min.js'], //use min for release, otherwise other for testing
8282
dest: 'example/<%= pkg.name %>.js'
8383
}
8484
},

dist/angular-google-maps.js

+8-17
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,6 @@
17011701
this.$log = directives.api.utils.Logger;
17021702
this.$timeout = $timeout;
17031703
this.restrict = 'ECMA';
1704-
this.replace = true;
17051704
this.require = '^googleMap';
17061705
this.priority = -1;
17071706
this.transclude = true;
@@ -1892,16 +1891,15 @@
18921891

18931892
Marker.prototype.controller = [
18941893
'$scope', '$element', function($scope, $element) {
1895-
return this.getMarker = function() {
1896-
return $element.data('instance');
1894+
return {
1895+
getMarker: function() {
1896+
return $element.data('instance');
1897+
}
18971898
};
18981899
}
18991900
];
19001901

19011902
Marker.prototype.link = function(scope, element, attrs, ctrl) {
1902-
scope.$on('$includeContentLoaded', function(evt) {
1903-
return ctrl.init(element.next());
1904-
});
19051903
return new directives.api.models.parent.MarkerParentModel(scope, element, attrs, ctrl, this.$timeout);
19061904
};
19071905

@@ -1952,16 +1950,15 @@ not 1:1 in this setting.
19521950

19531951
Markers.prototype.controller = [
19541952
'$scope', '$element', function($scope, $element) {
1955-
return this.getMarkersScope = function() {
1956-
return $scope;
1953+
return {
1954+
getMarkersScope: function() {
1955+
return $scope;
1956+
}
19571957
};
19581958
}
19591959
];
19601960

19611961
Markers.prototype.link = function(scope, element, attrs, ctrl) {
1962-
scope.$on('$includeContentLoaded', function(evt) {
1963-
return ctrl.init(element.next());
1964-
});
19651962
return new directives.api.models.parent.MarkersParentModel(scope, element, attrs, ctrl, this.$timeout);
19661963
};
19671964

@@ -4501,12 +4498,6 @@ angular.module('google-maps')
45014498
* @param attrs
45024499
*/
45034500
link: function (scope, element, attrs) {
4504-
//new as of angular 1.2.1+
4505-
//https://github.com/angular/angular.js/issues/4935
4506-
//http://plnkr.co/edit/oeWTQbzrBGSBzi1iu2WQ?p=preview
4507-
scope.$on('$includeContentLoaded', function(evt) {
4508-
ctrl.init(element.next());
4509-
});
45104501

45114502
// Center property must be specified and provide lat &
45124503
// lng properties

dist/angular-google-maps.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/coffee/directives/api/i-marker.coffee

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@$log = directives.api.utils.Logger
1414
@$timeout = $timeout
1515
@restrict = 'ECMA'
16-
@replace = true
1716
@require = '^googleMap'
1817
@priority = -1
1918
@transclude = true

src/coffee/directives/api/marker.coffee

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
@$log.info(@)
1212

1313
controller: ['$scope', '$element', ($scope, $element) ->
14-
@getMarker = ->
14+
getMarker: ->
1515
$element.data('instance')
1616
]
1717
link: (scope, element, attrs, ctrl) =>
18-
scope.$on('$includeContentLoaded', (evt) ->
19-
ctrl.init(element.next())
20-
)
2118
new directives.api.models.parent.MarkerParentModel(scope, element, attrs, ctrl, @$timeout)

src/coffee/directives/api/markers.coffee

+1-4
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ not 1:1 in this setting.
2828
@$log.info(@)
2929

3030
controller: ['$scope', '$element', ($scope, $element) ->
31-
@getMarkersScope = ->
31+
getMarkersScope: ->
3232
$scope
3333
]
3434

3535
link: (scope, element, attrs, ctrl) =>
36-
scope.$on('$includeContentLoaded', (evt) ->
37-
ctrl.init(element.next())
38-
)
3936
new directives.api.models.parent.MarkersParentModel(scope, element, attrs, ctrl, @$timeout)

src/js/directives/map.js

-6
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ angular.module('google-maps')
114114
* @param attrs
115115
*/
116116
link: function (scope, element, attrs) {
117-
//new as of angular 1.2.1+
118-
//https://github.com/angular/angular.js/issues/4935
119-
//http://plnkr.co/edit/oeWTQbzrBGSBzi1iu2WQ?p=preview
120-
scope.$on('$includeContentLoaded', function(evt) {
121-
ctrl.init(element.next());
122-
});
123117

124118
// Center property must be specified and provide lat &
125119
// lng properties

0 commit comments

Comments
 (0)