Skip to content

Instantly share code, notes, and snippets.

@mnmly
Created November 7, 2012 07:14
Show Gist options
  • Save mnmly/4029971 to your computer and use it in GitHub Desktop.
Save mnmly/4029971 to your computer and use it in GitHub Desktop.
snippet
class App extends Spine.Controller
constructor: ->
super
@setupStage()
@routes
"/": =>
$('.query-fields').visible()
@navController = new NavControllor(el: $('.query-fields'))
@navController.bind 'onDataFetched', (data)=>
@draw(data)
"/frequency": (params) =>
@currentView = @frequencyType = new FrequencyType(canvas: @svg, config: @config)
@frequencyType.start()
"/share": (params) =>
@currentView = @circleType = new CircleType(canvas: @svg, config:@config)
@circleType.start()
Spine.Route.setup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment