Skip to content

Instantly share code, notes, and snippets.

@ColinCampbell
Forked from enyo/test.js
Created March 12, 2010 19:55
Show Gist options
  • Save ColinCampbell/330715 to your computer and use it in GitHub Desktop.
Save ColinCampbell/330715 to your computer and use it in GitHub Desktop.
components: SC.ScrollView.design({
layout: { top: 20, bottom: 10, left: 10, right: 10 },
contentView: SC.ListView.design({
content: [
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test' },
{ name: 'test2' },
{ name: 'test3' },
{ name: 'test3' }
],
rowHeight: 40,
// you'll need to use the SC.ContentDisplay mixin
exampleView: SC.View.design(SC.ContentDisplay, {
layout: { height: 40 },
childViews: [SC.LabelView.design({
layout: { centerY: 0, centerX: 0, height: 40, left: 0, right: 0 },
textAlign: SC.ALIGN_CENTER,
controlSize: SC.LARGE_CONTROL_SIZE,
valueBinding: '.parentView*content.name'
})]
})
})
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment