Sha256: a6df4f79c6f9822e849b45449a3cdb98c2b8fff83606897b0cbf663dbe7de2cf
Contents?: true
Size: 1.31 KB
Versions: 41
Compression:
Stored size: 1.31 KB
Contents
// ========================================================================== // 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) // ========================================================================== SC.THREE_SLICE = ['left', 'middle', 'right']; SC.NINE_SLICE = [ 'top-left', 'top', 'top-right', 'left', 'middle', 'right', 'bottom-left', 'bottom', 'bottom-right' ]; SC.RenderDelegate.reopen({ /*@scope SC.RenderDelegate.prototype*/ /** Use this to render slices that you can match in CSS. This matches with the Chance @include slices directive, so that you can automatically do multi-slice images for controls. @param {SC.Object} dataSource The data source for rendering information. @param {SC.RenderContext} context the render context instance @param {Slice Configuration} slices Instructions on how to slice. Can be a constant like SC.THREE_SLICE or SC.NINE_SLICE, or an array of slice names. */ includeSlices: function(dataSource, context, slices) { for (var idx = 0, len = slices.length; idx < len; idx++) { context.push('<div class="' + slices[idx] + '"></div>'); } } });
Version data entries
41 entries across 41 versions & 1 rubygems