coffeescript-ui
Version:
Coffeescript User Interface System
50 lines (39 loc) • 1.13 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('./HorizontalLayout.html'));
class CUI.HorizontalLayout extends CUI.Layout
# [String] css name of this class , excluding namespace prefix
getName: ->
if
return "horizontal-layout"
panes =
if panes.length == 2
"horizontal-layout-left-center-right"
else if "left" in panes
"horizontal-layout-left-center"
else if "right" in panes
"horizontal-layout-center-right"
else
"horizontal-layout-center"
getMapPrefix: ->
"cui-horizontal-layout"
hasFlexHandles: ->
if ?.flexHandle or ?.flexHandle
return true
false
# [Array] the first and last pane name of this 3 pane layout
getPanes: ->
if
return ["left", "right"]
panes = []
if
panes.push("left")
if
panes.push("right")
panes
getSupportedPanes: ->
["left", "right"]