mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Rename PaneDivision to PaneGrid
This commit is contained in:
24
src/app/pane-grid.coffee
Normal file
24
src/app/pane-grid.coffee
Normal 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()
|
||||
Reference in New Issue
Block a user