 
 		animationOptions ?= @animationOptions
 		animationOptions.properties = {}
-		
+
 		animatingKeys = @animatingKeys()
 
 		for k, v of @_states[stateName]

	next:  ->
		# TODO: maybe add animationOptions
		states = Utils.arrayFromArguments arguments
		
		if not states.length
			states = @states()
		
		@switch Utils.arrayNext(states, @_currentState)


	last: (animationOptions) ->
		# Return to last state
		@switch _.last(@_previousStates), animationOptions


				continue

			# Allow dynamic properties as functions
			v = v.call(@layer, @layer, stateName) if _.isFunction(v)

			animationOptions.properties[k] = v

		animation = @layer.animate animationOptions

		animation.on "stop", =>
			@emit "didSwitch", _.last @_previousStates, stateName, @

	switchInstant: (stateName) ->
		# Instantly switch to this new state
		@switch stateName,
