(DEPRECATED) Mixin: SC.StaticLayout
SC.StaticLayout is now built in to
SC.View. You do not need to
apply this mixin to use static layout. Just set
Normally, SproutCore views use absolute positioning to display themselves on the screen. While this is both the fastest and most efficient way to display content in the web browser, sometimes your user interface might need to take advantage of the more advanced "flow" layout offered by the browser when you use static and relative positioning.
This mixin can be added to a view class to enable the use of any kind of
static and relative browser positioning. In exchange for using static
layout, you will lose a few features that are normally available on a view
class such as the 'frame' and 'clippingFrame' properties as well as
notifications when your view or
parentView are resized.
Normally, if you are allowing the browser to manage the size and positioning of your view, these feature will not be useful to your code anyway.
To enable static layout on your view, just include this mixin on the view.
SproutCore's builtin views that are capable of being used in static
layouts already incorporate this mixin. Then set the "useStaticLayout"
property on your view class to
You can then use CSS or the render() method on your view to setup the positioning on your view using any browser layout mechanism you want.
Defined in: static_layout.js
- SproutCore 1.0
Field DetailSC.StaticLayout.hasStaticLayout Boolean
Walk like a duck. Used to determine that this mixin has been applied.
Note that a view that
hasStaticLayout still may not actually use static
useStaticLayout is also set to
- Default value: