WIP: Use rake to start compiling resources (like require.coffee)

This commit is contained in:
Nathan Sobo
2012-08-26 16:29:46 -05:00
parent 72468b7028
commit c3e748a17c
128 changed files with 35213 additions and 7 deletions

24
src/app/pane-grid.coffee Normal file
View File

@@ -0,0 +1,24 @@
$ = require 'jquery'
{View} = require 'space-pen'
module.exports =
class PaneGrid extends View
@deserialize: ({children}, rootView) ->
childViews = children.map (child) -> rootView.deserializeView(child)
new this(childViews)
initialize: (children=[]) ->
@append(children...)
serialize: ->
viewClass: @className()
children: @childViewStates()
childViewStates: ->
$(child).view().serialize() for child in @children()
horizontalChildUnits: ->
$(child).view().horizontalGridUnits() for child in @children()
verticalChildUnits: ->
$(child).view().verticalGridUnits() for child in @children()