// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // Portions ©2008-2011 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== /** Renders and updates the HTML representation of SC.SegmentedView. */ SC.BaseTheme.segmentedRenderDelegate = SC.RenderDelegate.create({ className: 'segmented', /* We render everything external to the segments and let each segment use it's own render delegate to render its contents. */ render: function(dataSource, context) { // Use text-align to align the segments this.addSizeClassName(dataSource, context); context.addStyle('text-align', dataSource.get('align')); }, update: function(dataSource, jquery) { this.updateSizeClassName(dataSource, jquery); jquery.css('text-align', dataSource.get('align')); } });