You are setting the layout angle to stay always as 90.
You would need to make the even recognize the layout angle and add or subtract 90 to it.
I couldn't find this kind of expression for the layout so I simply created a variable that keep control of the layout angle with the additions or subtractions of 90.
Check it out:
dl.dropbox.com/u/23138239/Layout%20angle.capx