coffeescript-ui
Version:
Coffeescript User Interface System
51 lines (40 loc) • 1.18 kB
text/coffeescript
###
* coffeescript-ui - Coffeescript User Interface System (CUI)
* Copyright (c) 2013 - 2016 Programmfabrik GmbH
* MIT Licence
* https://github.com/programmfabrik/coffeescript-ui, http://www.coffeescript-ui.org
###
CUI.Template.loadTemplateText(require('./VerticalLayout.html'));
class CUI.VerticalLayout extends CUI.Layout
# [String] css name of this class , excluding namespace prefix
getName: ->
if
return "vertical-layout"
panes =
# console.debug CUI.util.getObjectClass(@)+".getPanes: ",panes
if panes.length == 2
"vertical-layout-top-center-bottom"
else if "top" in panes
"vertical-layout-top-center"
else if "bottom" in panes
"vertical-layout-center-bottom"
else
"vertical-layout-center"
getMapPrefix: ->
"cui-vertical-layout"
hasFlexHandles: ->
if ?.flexHandle or ?.flexHandle
return true
false
# [Array] the first and last pane name of this 3 pane layout
getPanes: ->
if
return ["top", "bottom"]
panes = []
if
panes.push("top")
if
panes.push("bottom")
panes
getSupportedPanes: ->
["top", "bottom"]