new Frame()
wp.media.view.Frame
A frame is a composite view consisting of one or more regions and one or more
states.
- Mixes In:
- Source:
- See:
Extends
- wp.media.View
- wp.Backbone.View
- Backbone.View
Methods
-
_createModes()
-
A frame can be in a mode or multiple modes at one time. For example, the manage media frame can be in the `Bulk Select` or `Edit` mode.
- Source:
-
_createStates()
-
Create the frame's states.
- Source:
- See:
Fires:
- wp.media.controller.State#event:ready
-
activateMode(string)
-
Activate a mode on the frame.
Parameters:
Name Type Description string
mode Mode ID. - Source:
Returns:
Returns itself to allow chaining.- Type
- this
-
deactivateMode(string)
-
Deactivate a mode on the frame.
Parameters:
Name Type Description string
mode Mode ID. - Source:
Returns:
Returns itself to allow chaining.- Type
- this
-
dispose()
-
- Inherited From:
- Source:
- To Do:
-
- The internal comment mentions this might have been a stop-gap before Backbone 0.9.8 came out. Figure out if Backbone core takes care of this in Backbone.View now.
Returns:
Returns itself to allow chaining.- Type
- wp.media.View
-
isModeActive(string)
-
Check if a mode is enabled on the frame.
Parameters:
Name Type Description string
mode Mode ID. - Source:
Returns:
bool -
remove()
-
- Inherited From:
- Source:
Returns:
Returns itself to allow chaining.- Type
- wp.media.View
-
reset()
-
Reset all states on the frame to their defaults.
- Source:
Returns:
Returns itself to allow chaining.- Type
- wp.media.view.Frame
-
triggerModeEvents()
-
Map activeMode collection events to the frame.
- Source:
Events
-
{mode}:deactivate
-
Frame mode deactivation event.
- Source: