-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
showcase/views/stacked_views.js
Line 19 in 1eab667
| example: "SC.ScrollView.extend({ classNames: ['my-scroll-view'], layout: { left: 20, right: 20, top: 20, bottom: 20 }, contentView: SC.StackedView.extend({ classNames: ['my-stacked-view'], content: ['These rows have statically laid out content with random heights. Selecting a row causes the row to re-render with a new height.',1,2,3,4,5,6], exampleView: SC.View.extend({ displayProperties: ['isSelected'], useStaticLayout: true, render: function(context) { context.setClass('sel', this.get('isSelected')); context.push('<div style=\"height: ' + (20 + Math.round((Math.random() * 100))) + 'px;\">' + this.get('content') + '</div>'); } }), selectionDidChange: function() { this.updateHeight(false); }.observes('selection') }) })" |
i could not even explain....
so beatiful thing with such ugly examples :)
Metadata
Metadata
Assignees
Labels
No labels