Sha256: f1e73227b860d950d387840673512f85d0e7dc83225eff61c6d2893bcd54f072
Contents?: true
Size: 1.15 KB
Versions: 19
Compression:
Stored size: 1.15 KB
Contents
Luca.containers.ColumnView = Luca.core.Container.extend componentType: 'column_view' className: 'luca-ui-column-view' components: [] initialize: (@options={})-> Luca.core.Container::initialize.apply @, arguments @setColumnWidths() componentClass: 'luca-ui-column' containerTemplate: "containers/basic" appendContainers: true autoColumnWidths: ()-> widths = [] _( @components.length ).times ()=> widths.push( parseInt( 100 / @components.length ) ) widths setColumnWidths: ()-> @columnWidths = if @layout? _( @layout.split('/') ).map((v)-> parseInt(v) ) else @autoColumnWidths() @columnWidths = _( @columnWidths ).map (val)-> "#{ val }%" beforeComponents: ()-> @debug "column_view before components" _( @components ).each (component)-> component.ctype ||= "panel_view" beforeLayout: ()-> @debug "column_view before layout" _(@columnWidths).each (width,index) => @components[index].float = "left" @components[index].width = width Luca.core.Container::beforeLayout?.apply @, arguments Luca.register 'column_view', "Luca.containers.ColumnView"
Version data entries
19 entries across 19 versions & 1 rubygems