 				b:
 					scale: 1
 					opacity: 1
-			@statesB.animationOptions =
-				curve: "spring(800,28,0)"
+
+			@statesB.on Events.StateWillSwitch, (from, to) =>
+				if to is "b"
+					@statesB.animationOptions =
+						curve: "spring(800,28,0)"
+				if to is "a"
+					@statesB.animationOptions =
+						curve: "ease-out"
+						time: 0.15
 
 		if @navComponent.background
 			@background = @navComponent.background


	back: (animate=true) ->

		@statesB?.animationOptions.animate = animate
		@statesB?.switch("a")


		@statesBackground?.switch("a")
		@statesBackground?.once Events.StateDidSwitch, =>
			@background?.visible = false
			@layerB.visible = false

class NavComponentDialogTransition extends NavComponentBackgroundTransition

