Class: SC.AutoResizingMenuPane
Extends SC.MenuPane to add support for automatic resizing.
Defined in: menu.js
Field Summary
Field Detail
exampleView SC.ViewThe view class to use when creating new menu item views.
The menu pane will automatically create an instance of the view class you
set here for each item in the items
array. You may provide your own
subclass for this property to display the customized content.
- Default value:
- SC.AutoResizingMenuItemView
The amount to add to any calculated width.
If no value is specified, it will be determined from the controlSize
.
- Default value:
- menuWidthPadding from render delegate, or 0
The minimum width for this menu if it is to be automatically resized.
If no value is specified, it will be determined from the controlSize
.
- Default value:
- minimumMenuWidth from render delegate, or 0.
If YES
, the menu should automatically resize its width to fit its items.
This will swap out the default SC.MenuItemView.
If you are using a custom
exampleView
, you will need to mix SC.AutoResize
into your exampleView
and set shouldAutoResize
to NO
(the actual resizing will be handled
by SC.MenuPane).
This property must be set before instantiation; any changes after instantiation will not function properly.
- Default value:
- YES