Sha256: f5d2d07a8a07c1d624cb304019db64552d8c0fa91610fa54d42d05b07165fb95
Contents?: true
Size: 1.38 KB
Versions: 4
Compression:
Stored size: 1.38 KB
Contents
// ========================================================================== // Project: Showcase // Copyright: ©2012 7x7 Software, Inc. // License: Licensed under MIT license // ========================================================================== /*globals Showcase */ sc_require('system/views_item_content.js'); sc_require('views/views_list_view.js'); /** This pre-configured view demonstrates SC.StackedView. */ Showcase.stackedViews = SC.ScrollView.design({ contentView: Showcase.ViewsListView.design({ content: [ Showcase.ViewsItemContent.create({ title: 'Regular', 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') }) })" }) ], exampleHeight: 420 }) });
Version data entries
4 entries across 4 versions & 1 rubygems