Skip to content

Commit 9143c6f

Browse files
GeoffreyBoothGuillaume Chau
authored andcommitted
Refactor the GoogleMap component’s script to be in CoffeeScript, to provide an example of CoffeeScript usage (#13)
1 parent ceb3d18 commit 9143c6f

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

.meteor/versions

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ accounts-base@1.3.1
22
accounts-password@1.4.0
33
akryum:npm-check@0.0.3
44
akryum:vue-coffee@0.0.5
5-
akryum:vue-component@0.10.5
5+
akryum:vue-component@0.10.6
66
akryum:vue-component-dev-client@0.2.12
77
akryum:vue-component-dev-server@0.0.10
88
akryum:vue-less@0.0.5
@@ -25,7 +25,8 @@ caching-html-compiler@1.1.2
2525
callback-hook@1.0.10
2626
check@1.2.5
2727
chuangbo:cookie@1.1.0
28-
coffeescript@1.12.6_1
28+
coffeescript@1.12.7_1
29+
coffeescript-compiler@1.12.7_1
2930
cosmos:browserify@0.10.0
3031
ddp@1.3.0
3132
ddp-client@2.0.0

src/imports/ui/GoogleMap.vue

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,21 @@
1919
</div>
2020
</template>
2121

22-
<script>
23-
export default {
24-
data () {
25-
return {
26-
description: 'Paris',
27-
position: {lat:48.85661400000001, lng:2.3522219000000177},
28-
}
29-
},
30-
methods: {
31-
setPlace (place) {
32-
this.place = place
33-
this.position = {
34-
lat: place.geometry.location.lat(),
35-
lng: place.geometry.location.lng(),
36-
}
37-
},
38-
},
39-
}
22+
<script lang="coffee">
23+
export default
24+
data: ->
25+
return
26+
description: 'Paris'
27+
position:
28+
lat: 48.85661400000001
29+
lng: 2.3522219000000177
30+
31+
methods:
32+
setPlace: (place) ->
33+
@place = place
34+
@position =
35+
lat: place.geometry.location.lat()
36+
lng: place.geometry.location.lng()
4037
</script>
4138

4239
<style lang="stylus" scoped>

0 commit comments

Comments
 (0)