Protocol: SC.ViewTransitionProtocol

The SC.ViewTransitionProtocol protocol defines the properties and methods that you may implement in your custom transition plugins. The only required method for a plugin to implement is run.

SC.View uses transition plugins to setup, execute and cleanup the swapping between views and expects the given transition plugin object to implement this protocol. Note: Do not mix SC.ViewTransitionProtocol into your classes. As a protocol, it exists only for reference sake. You only need define any of the properties or methods listed below in order to use this protocol.*

Defined in: view_transition_protocol.js

Field Summary

Class Methods

Field Detail

SC.ViewTransitionProtocol.layoutProperties Array

This optional property exposes a list of layout properties involved in the transition. This allows the view to more intelligently reset its layout when the transition is complete.

If unspecified, the transition will cache and reset the entire layout hash. This can cause problems when spearately adjusting or animating those properties during a transition. (Note that you should not adjust or animate the layout properties that are involved in a transition while the transition is under way.)

Default value:
All layout properties

Class Method Detail

run(view, options, finalLayout, finalFrame)

This method is called to transition the view in or visible (i.e. transitionIn or transitionShow).

When the transition completes, this function must call didTransitionIn() on the view, passing this object and the original options as arguments.

Parameters:
view SC.View
The view being transitioned.
options Object
Options to modify the transition. As set by transitionShowOptions or transitionInOptions.
finalLayout Object
The final layout of the view, which may be different than the starting layout of the view if a previous transition was cancelled in place.
finalFrame Object
The final frame of the view, which may be different than the starting frame of the view if a previous transition was cancelled in place.
setup(view, options, inPlace)

This optional method is called to set up the entrance transition (i.e. transitionIn or transitionShow).

Use this method to adjust the layout of the view so that it may be properly animated. For example, you may need to adjust the content from a flexible layout (i.e. { left: 0, top: 0, right: 0, bottom: 0 }) to a fixed layout (i.e. { left: 0, top: 0, width: 100, height: 200 }) so that it can be moved.

Parameters:
view SC.View
The view being transitioned.
options Object
Options to modify the transition. As set by transitionShowOptions or transitionInOptions.
inPlace Boolean
Whether the transition should start with the current layout of the view, because a previous transition was cancelled in place.
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:21 GMT-0600 (CST)