src/core/transitionController.js
function _transitionViews( transitionObj )
	{
		if( !transitionObj ){ return TransitionController.error('transition is not defined'); }
		const transitionModule = _options.transitions[ transitionObj.transitionType ];
		
		if( transitionModule )  {

			const 	deferred 		= Deferred(),
					views 			= transitionObj.views,
					currentViewRef 	= transitionObj.currentViewID,
					nextViewRef 	= transitionObj.nextViewID;

			/* individual transition completed */
			deferred.promise.then( () => {
				transitionComplete.dispatch( transitionObj );
				TransitionController.log( transitionObj.transitionType +' -- completed');
			});

			if( transitionModule.initialize ){
				transitionModule.initialize( views, transitionObj.data, deferred, currentViewRef, nextViewRef );
			}

			transitionStarted.dispatch( transitionObj );
			TransitionController.log( transitionObj.transitionType +' -- started');
			transitionModule.animate( views, transitionObj.data, deferred, currentViewRef, nextViewRef );
			
			return deferred.promise;
		}
		else {
			TransitionController.error(transitionObj.transitionType + ' does NOT exist' );
		}
	}
function _transitionViews( transitionObj )
	{
		if( !transitionObj ){ return TransitionController.error('transition is not defined'); }
		const transitionModule = _options.transitions[ transitionObj.transitionType ];
		
		if( transitionModule )  {

			const 	deferred 		= Deferred(),
					views 			= transitionObj.views,
					currentViewRef 	= transitionObj.currentViewID,
					nextViewRef 	= transitionObj.nextViewID;

			/* individual transition completed */
			deferred.promise.then( () => {
				transitionComplete.dispatch( transitionObj );
				TransitionController.log( transitionObj.transitionType +' -- completed');
			});

			if( transitionModule.initialize ){
				transitionModule.initialize( views, transitionObj.data, deferred, currentViewRef, nextViewRef );
			}

			transitionStarted.dispatch( transitionObj );
			TransitionController.log( transitionObj.transitionType +' -- started');
			transitionModule.animate( views, transitionObj.data, deferred, currentViewRef, nextViewRef );
			
			return deferred.promise;
		}
		else {
			TransitionController.error(transitionObj.transitionType + ' does NOT exist' );
		}
	}
function _transitionViews ( transitionObj ) { if ( ! transitionObj ) { return TransitionController . error ( 'transition is not defined' ) ; } const transitionModule = _options . transitions [ transitionObj . transitionType ] ; if ( transitionModule ) { const deferred = Deferred ( ) , views = transitionObj . views , currentViewRef = transitionObj . currentViewID , nextViewRef = transitionObj . nextViewID ; /* individual transition completed */ deferred . promise . then ( ( ) => { transitionComplete . dispatch ( transitionObj ) ; TransitionController . log ( transitionObj . transitionType + ' -- completed' ) ; } ) ; if ( transitionModule . initialize ) { transitionModule . initialize ( views , transitionObj . data , deferred , currentViewRef , nextViewRef ) ; } transitionStarted . dispatch ( transitionObj ) ; TransitionController . log ( transitionObj . transitionType + ' -- started' ) ; transitionModule . animate ( views , transitionObj . data , deferred , currentViewRef , nextViewRef ) ; return deferred . promise ; } else { TransitionController . error ( transitionObj . transitionType + ' does NOT exist' ) ; } }
transition the views, find the transition module if it
exists then pass in the linked views, data and settings

@param  {onject} transitionObj  - contains {transitionType, views, currentViewID, nextViewID}
@param  {array} viewsToDispose  - array to store the views passed to each module to dispatch on transition completed
@return {array} promises from Deferred
transition the views find the transition module if it exists then pass in the linked views data and settings