1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            Portions ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 
  8 /**
  9   Renders and updates the HTML representation of SC.SegmentedView.
 10 */
 11 SC.BaseTheme.segmentedRenderDelegate = SC.RenderDelegate.create({
 12   className: 'segmented',
 13 
 14   /*
 15     We render everything external to the segments and let each segment use it's own render
 16     delegate to render its contents.
 17 
 18     */
 19   render: function(dataSource, context) {
 20     // Use text-align to align the segments
 21     this.addSizeClassName(dataSource, context);
 22     context.addStyle('text-align', dataSource.get('align'));
 23   },
 24 
 25   update: function(dataSource, jquery) {
 26     this.updateSizeClassName(dataSource, jquery);
 27     jquery.css('text-align', dataSource.get('align'));
 28   }
 29 
 30 });
 31