1
1
### global _:true, angular:true, google:true ###
2
2
do ->
3
+ # coffeelint:disable=check_scope
3
4
capitalize = (s ) ->
4
5
return s[0 ].toUpperCase () + s .slice (1 )
6
+ # coffeelint:enable=check_scope
5
7
6
8
class MapObject
7
9
getMap : =>
65
67
class Marker extends MapObject
66
68
_ .extend @ :: , PositionObject :: , DraggableObject :: , VisibleObject ::
67
69
@instances = 0
70
+ # coffeelint:disable=no_private_function_fat_arrows
68
71
@ resetInstances = =>
72
+ # coffeelint:enable=no_private_function_fat_arrows
69
73
@instances = 0
70
74
@ creationSubscribe = (obj , cb ) ->
71
75
window .google .maps .event .addListener (obj, ' creation' , cb)
@@ -115,7 +119,9 @@ do ->
115
119
class Circle extends MapObject
116
120
_ .extend @ :: , DraggableObject :: , VisibleObject ::
117
121
@instances = 0
122
+ # coffeelint:disable=no_private_function_fat_arrows
118
123
@ resetInstances = =>
124
+ # coffeelint:enable=no_private_function_fat_arrows
119
125
@instances = 0
120
126
@ creationSubscribe = (obj , cb ) ->
121
127
window .google .maps .event .addListener (obj, ' creation' , cb)
@@ -128,16 +134,18 @@ do ->
128
134
@ setOptions opts
129
135
130
136
# getters
137
+ # coffeelint:disable=check_scope
131
138
@props .forEach (p) =>
132
- @ [" get#{ capitalize p } " ] = =>
139
+ @ [" get#{ capitalize (p) } " ] = =>
133
140
@ [p]
134
141
135
142
# setters
136
143
@props .forEach (p) =>
137
- @ [" set#{ capitalize p } " ] = (val ) =>
144
+ @ [" set#{ capitalize (p) } " ] = (val ) =>
138
145
@ [p] = val
139
146
if p == " radius" or p == " center"
140
147
window .google .maps .event .fireAllListeners " #{ p} _changed" , @
148
+ # coffeelint:enable=check_scope
141
149
142
150
Circle .instances += 1
143
151
@instance = Circle .instances
@@ -188,7 +196,9 @@ do ->
188
196
getMarkerWithLabel : ->
189
197
class MarkerWithLabel extends getMarker ()
190
198
@instances = 0
199
+ # coffeelint:disable=no_private_function_fat_arrows
191
200
@ resetInstances = =>
201
+ # coffeelint:enable=no_private_function_fat_arrows
192
202
@instances = 0
193
203
constructor : (opts ) ->
194
204
if opts?
@@ -221,8 +231,10 @@ do ->
221
231
getPolyline = ->
222
232
class Polyline extends DraggableObject
223
233
@instances = 0
234
+ # coffeelint:disable=no_private_function_fat_arrows
224
235
@ resetInstances = =>
225
236
@instances = 0
237
+ # coffeelint:enable=no_private_function_fat_arrows
226
238
constructor : (opts ) ->
227
239
if opts?
228
240
[' draggable' , ' editable' , ' map' ,' path' , ' visible' ].forEach (o) =>
@@ -241,7 +253,9 @@ do ->
241
253
getMVCArray = ->
242
254
class MVCArray extends Array
243
255
@instances = 0
256
+ # coffeelint:disable=no_private_function_fat_arrows
244
257
@ resetInstances = =>
258
+ # coffeelint:enable=no_private_function_fat_arrows
245
259
@instances = 0
246
260
constructor : ->
247
261
MVCArray .instances += 1
@@ -480,7 +494,7 @@ do ->
480
494
getLatLng : getLatLng
481
495
482
496
(new GoogleApiMock ()).initAll ()
483
-
497
+
484
498
angular .module (' uiGmapgoogle-maps.mocks' , [' uiGmapgoogle-maps' ])
485
499
.factory (' GoogleApiMock' , ->
486
500
GoogleApiMock
0 commit comments