Class: SC.StackedView


Extends SC.CollectionView.

A StackedView is a CollectionView that expects its content to use static layout to stack vertically. This type of collection view is not designed for use with large size collections, but it can be very useful for collections with complex displays and variable heights such as comments or small notification queues.

Static Layout

This view makes no attempt to size or position your child views. It assumes you are using StaticLayout for your child views. If you don't enable static layout your views will probably overlay on top of each other and will look incorrect.

Note also that the default layout for this view set's the height to "auto". This is usually the behavior you will want.

Defined in: stacked.js

Since:
SproutCore 0.9

Field Summary

Fields borrowed from SC.CollectionView:
acceptsFirstResponder, action, ACTION_DELAY, actOnSelect, allContentIndexes, calculatedHeight, calculatedWidth, canDeleteContent, canEditContent, canReorderContent, content, contentDelegate, contentExampleViewKey, contentGroupExampleViewKey, contentValueKey, delegate, displayProperties, dragContent, dragDataTypes, exampleView, groupExampleView, isActive, isDropTarget, isEditable, isEnabled, isSelectable, length, nowShowing, proposedDropOperation, proposedInsertionIndex, renderDelegateName, reorderDataType, rightIconAction, rightIconTarget, selection, selectionDelegate, selectOnMouseDown, target, useFastPath, useToggleSelection
Fields borrowed from SC.View:
acceptsMultitouch, ariaHidden, ariaRole, attributeBindings, autoMixins, backgroundColor, childViewLayout, childViewLayoutOptions, childViews, childViewsNeedLayout, classNameBindings, concatenatedProperties, createdByParent, designMode, enabledState, firstKeyView, hasLayout, hasTouch, hasVisibility, isBuildingIn, isBuildingOut, isChildViewLayoutLive, isFixedHeight, isFixedPosition, isFixedSize, isFixedWidth, isKeyResponder, isTextSelectable, isView, isVisible, lastKeyView, layerLocationNeedsUpdate, layerNeedsUpdate, modeAdjust, nextKeyView, page, pane, parentView, previousKeyView, shouldInheritCursor, shouldInheritEnabled, tagName, themeName, toolTip, touchBoundary, transitionAdjust, transitionAdjustOptions, transitionHide, transitionHideOptions, transitionIn, transitionInOptions, transitionOut, transitionOutOptions, transitionShow, transitionShowOptions, useStaticLayout
Fields borrowed from SC.Responder:
hasFirstResponder, isFirstResponder, responderContext
Fields borrowed from SC.Object:
isDestroyed, isObject, nextProperty, object, property, toInvalidate
Fields borrowed from SC.Observable:
isObservable

Instance Methods

Field Detail

classNames Array
Default value:
['sc-stacked-view']
See:
SC.View#classNames
layout Hash

Default layout for a stacked view will fill the parent view but auto- adjust the height of the view.

Default value:
`{ top: 0, left: 0, right: 0, height: 1 }`
See:
SC.View#layout

Instance Method Detail

computeNowShowing(rect)
Return full range of its indexes for nowShowing
Parameters:
rect Rect
Returns:
SC.IndexSet
full range of indexes
updateHeight(immediately)

Updates the height of the stacked view to reflect the current content of the view. This is called automatically whenever an item view is reloaded. You can also call this method directly if the height of one of your views has changed.

The height will be recomputed based on the actual location and dimensions of the last child view.

Note that normally this method will defer actually updating the height of the view until the end of the run loop. You can force an immediate update by passing YES to the "immediately" parameter.

Parameters:
immediately Boolean
YES to update immediately
Returns:
SC.StackedView
receiver
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:21 GMT-0600 (CST)