Files
openfoodnetwork/app/assets/javascripts/darkswarm/services/map.js.coffee
Rohan Mitchell be644bdcc3 Revert "Reworking flash messages hooray"
This reverts commit c9d0091cd9.
2014-06-06 16:59:47 +10:00

17 lines
436 B
CoffeeScript

Darkswarm.factory "OfnMap", (enterprisesForMap, MapModal)->
new class OfnMap
constructor: ->
@enterprises = (@extend(enterprise) for enterprise in enterprisesForMap)
# Adding methods to each enterprise
extend: (enterprise)->
new class MapMarker
icon: "/test.opng"
constructor: ->
@[k] = v for k, v of enterprise
reveal: =>
console.log @
MapModal.open @