Rename PaneDivision to PaneGrid

This commit is contained in:
Corey Johnson
2012-04-13 09:26:03 -07:00
parent e0e40e327b
commit 4e43f0e596
3 changed files with 5 additions and 5 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()